BMP Loading

Everything else that doesn't fall into one of the other PB categories.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

BMP Loading

Post 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 ?
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post 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
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Code: Select all

LoadImage(#Image, FileName$)
8)
--Kale

Image
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post 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)
Post Reply