Load a Bitmap : White color becomes gray

N

Nicolas Pietrzak

Hello,

I'm trying to load a Bitmap via the System.Drawing.Bitmap object. My file is
a empty white 8bit bmp. The code is the following :

Bitmap bitmap = new Bitmap (filename);
Color color = bitmap.GetPixel (0, 0);
MessageBox.Show (string.Format ("R: {0}, G: {1}, B: {2}", color.R, color.G,
color.B));

On Windows 2003 or a pocketPC 2003 emulator, the MessageBox message is "R:
255, G: 255, B:255". However, it is "R:248, G:248, B:248" on the pocketPC
device.

I have tried with 2 different pocketPCs (QTek and Dell) with different
Bitmap formats (8bit, 16bit, row order flipped). I have also tried to put
the bitmap in a resource file. The white background is still gray ! I need
some help.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top