adospace
1/20/2005 10:44:00 AM
Hi all,
I'm using DrawImage method to draw various kinds of images (bmp, gif &
jpeg) into a control paint event handler.
I notice that image drawn has different colors from the original saved
image.
For example if I draw an image with a RGB(192,192,192) background color the
resulting image displayed on the form has a RGB(198,195,198) background
color. I quite novice with GDI+: I'm only need to dispaly an image on the
form exactly as I can see with Paint.
Source Code:
Image img = Image.FromFile("path");
e.Graphics.DrawImage(img, destRect, sourceRect, GraphicsUnit.Pixel);
Thanks in advance!