Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How does QB64 support saving 8bit images?
#1
I've tried loading a 32 bit image and saving it as an 8bit image, but it doesn't seem to work.  Image editors like Graphics Gale can't seem to open it, and when I try to reload it that fails also.

Code: (Select All)

''Test loading a 32bit image and saving it to 8 bit
Option _Explicit

Screen _NewImage(320,240,256)

Dim img32& : img32& = _LoadImage("img32.png", 256)
Dim img8bit& : img8bit& = _NewImage(64, 64, 256)
_PutImage (0,0),img32&, img8bit&

_SaveImage "img8bit.bmp", img8bit&
_FreeImage(img32&)
_FreeImage(img8bit&)

Sleep
End

checking the image:
Code: (Select All)

''Load and check an image
Dim img8& : img8& = _LoadImage("img8bit&.bmp", 256)

Screen _NewImage(320, 240, 256)

_PutImage (0,0), img8&

_FreeImage(img8&)
sleep
end
Reply


Messages In This Thread
How does QB64 support saving 8bit images? - by CMR - 04-27-2025, 02:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  about Hardware Images and _DisplayOrder,Help! qbfans 11 541 02-11-2026, 07:10 AM
Last Post: SMcNeill
  Nth problem with hardware images Ikerkaz 9 471 01-23-2026, 02:58 PM
Last Post: bplus
  Hardware images questions Dav 5 462 12-04-2025, 04:18 PM
Last Post: Pete
  Hardware images...Talk to me! Unseen Machine 5 722 09-22-2025, 11:12 PM
Last Post: TempodiBasic
  Transparency with Hardware Images NakedApe 8 1,020 07-10-2025, 09:47 AM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)