understanding palette and BITMAP
Posted: Wed Jun 23, 2004 1:35 pm
I have searched for seting palette when running in 32 bit based modem but does not find nothing good for me.
could someone put here some link about understanding palette.
I have a small BMP file, which I want to draw it. the problem it is 8 bit BMP. every byte is an index on the palette. when plotting the bitmap I convert the index to its color, but I see the picture not as origin.
getting palette:
could someone put here some link about understanding palette.
I have a small BMP file, which I want to draw it. the problem it is 8 bit BMP. every byte is an index on the palette. when plotting the bitmap I convert the index to its color, but I see the picture not as origin.
getting palette:
Code: Select all
for(i=0;i<256;i++)
{
b=fgetc(file);
g=fgetc(file);
r=fgetc(file);
palette[i][0] = 0;
palette[i][1] = b;
palette[i][2] = g;
palette[i][3] = r;
fgetc(file);
}