Page 1 of 1

BMP Loading

Posted: Tue Dec 27, 2005 6:26 pm
by Polo
Hi !
I'm currently trying to do a BMP Loading procedure, but I don't manage to load others bitmaps than 24 bits ones, I would like to support 1, 4 and 8 bits also, but I'm unsure of how to do it :?
Does someone already tried that ?

Posted: Tue Dec 27, 2005 7:55 pm
by va!n
you must check the header of the bmp and its depth and bitplanes... i think this would help you... first i would try to load 32 bit images too, as they are using A,R,G,B (alpha channel) too... good luck

Posted: Tue Dec 27, 2005 7:57 pm
by Kale

Code: Select all

LoadImage(#Image, FileName$)
8)

Posted: Tue Dec 27, 2005 8:21 pm
by Polo
Obviously you did know I wanted to do it by myself, without PB's function :)
I manage to read the header, it's the pixel reading that I don't know how to do (for 1bit bitmaps)