1
QB64 Discussion / loading a 256 color image
« on: April 12, 2019, 11:01:15 am »
I'm trying to load a 256 color picture into a 1289,720,256 screen but i keep getting "illegal function call" when i _putimage. I suspect its the picture itself, what is the best way to convert images to 256 colors so they are compatible with QB64.
here is a copy of the code.
DIM pic&
SCREEN _NEWIMAGE(1280, 720, 256)
temp
SUB temp
pic& = _LOADIMAGE("demon.bmp")
'_COPYPALETTE backgrnd1, 0
_PUTIMAGE (3, 3), pic&
SLEEP
END SUB
here is a copy of the code.
DIM pic&
SCREEN _NEWIMAGE(1280, 720, 256)
temp
SUB temp
pic& = _LOADIMAGE("demon.bmp")
'_COPYPALETTE backgrnd1, 0
_PUTIMAGE (3, 3), pic&
SLEEP
END SUB