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


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

Is there any problem in the code.

Please anyone help.

Thanks in advance