3
Reply

[WINFORM] Image snapshot.Improve the image quality? (System.Drawing.Imaging.PixelFormat)

narasimman g

narasimman g

Jan 19 2011 6:22 AM
15.3k

Hi All,
Am capturing application window and saving it as image file using c#
my window contains RED COLOR..red color is blurred in saved image
below is my coding snippet
bmpScreenshot =
new Bitmap(MdiParent.Width, MdiParent.Height, PixelFormat.Format24bppRgb);
// Create a graphics object from the bitmap
gfxScreenshot =
Graphics.FromImage(bmpScreenshot);
// Take the screenshot from the upper left corner to the right bottom corner
gfxScreenshot.CopyFromScreen(MdiParent.Location.X, MdiParent.Location.Y, 0, 0, MdiParent.Size,
CopyPixelOperation.SourceCopy);
// Save the screenshot to the specified path that the user has chosen
bmpScreenshot.Save(saveScreenshot.FileName, img);
 
How to improve the image quality?

Answers (3)