Dear All,

I want to display the bitmap. So what i did is, read the 8bpp bitmap raw data using the stdlib functions fread(), in the binay mode from the bitmap file.
Since the file is 8bpp, i left the pallette table present in the file say 256*4 bytes in the file and started reading the data after the pallette table and put it in the screen directly.
The image colour is totally different.But the picture comes in the display.

Code which is reading the bitmap file

for(i=(b->height-1)*b->width;i>=0;i-=b->width)
for(x=0;x<b->width;x++)
b->data[(word)i+x]=(byte)fgetc(fp);


The code for filling the screen address

TUint8 *buf=(TUint8 *)parm->write.bitmap;
TUint8 buf1;
TUint16 Value=((parm->write.wRegion) *((parm->write.hRegion)-1));
for (;j<Value;j++)//38720
{
buf1=buf[j];
*(s++)=buf1;
}

Is there any problem in the code.

Please anyone help.

Thanks in advance
Gilly