narasimman g

narasimman g

  • 1.6k
  • 160
  • 352.1k

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

Jan 19 2011 6:22 AM

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)