Advertisement

Loading color index tables from files...

Started by January 31, 2000 02:59 AM
1 comment, last by Someone 24 years, 10 months ago
Hi! I''m kinda new to handling images in C++. I''m just wondering how do you handle the color index table and image data from an image file such as those BMPs made using Photoshop. Are there any special classes or something to use? And also, does anyone know how or knows of a tutorial to use those color index tables on a texture using OpenGL?
I''m not quite sure of what you want to achieve but....if I am right you want some info about how to detect what kind of palette is used and how to use it in your program, right?

If not, then I''ll write the follwoing down for nothing, but......oh well.

I''ll take BMP''s for example.
BMP''s contain data just like every other file, but there is a part which contains the palette colors.......IF the bitmap is either 1, 2, 4 or 8 bit, otherwise there is NO palette.
For bitmaps you have a bitmapinfoheader....in that header is the palette stored.....

To load a bitmap, I think you''d better take a good look on the
BitmapInfoHeader and BitmapFileHeader.

I;''m a bit busy at work right now, so.....email me when you want more info

Dance with me......

http://members.xoom.com/CJdeVos/index.htm

Advertisement
That''s right. Basically I''d just want to retrieve the pallete data from the BMP file, i.e. Color Index 1 represents what color, Color Index 2 represents what color and such.

I''ll take a look at those 2 types and see.

This topic is closed to new replies.

Advertisement