Images and Banks

BlitzPlus Forums/BlitzPlus Programming/Images and Banks

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Pixel data is in the following format if using 24bit, AARRGGBB, which means that if you only want the color data, and not have any alpha you can do an "and $FFFFFF" on the value you get with peekInt. The individual colors are extraced like so:

red = ( RGB shr 16 ) and $FF
green = ( RGB shr 8 ) and $FF
blue = RGB and $FF

You can get back to the RGB color like so:

RGB = red shl 16 + green shl 8 + blue

I hope that helps somewhat.