I want to be able to take a low-quality image of the screen. I can take a bitmap picture, but no matter what I do I can't lower its quality.
Launch the screen that you want to capture and then press the PrintScreen button on your keyboard. This will copy the screen to the clipboard. Now press Ctrl + S in order to save your newly captured high-resolution screenshot in Windows.
The file format used when saving screenshots can also affect the image quality. Two of the most popular formats are jpg (lossy format) and png (lossless format). Your screenshots will look better if you save them with PNG, but the file size will be considerably larger compared to saving them with JPEG.
Resolution makes a significant difference in the image quality of a screen shot. Resolution refers to the number of pixels (or dots) per inch of the image. A higher resolution means improved quality. There are steps you take to increase the resolution of your next screen shot.
Screenshots should be in full resolution, but the way you send it to yourself may cause the resolution to be reduced. In particular, Google Inbox reduces the resolution of photos by default when emailing them. You should be okay sending it to yourself using Apple Mail, and selecting full resolution.
Image bmp1 = GetScreenImage ();
// Save the image as a GIF.
bmp1.Save("c:\\button.gif", System.Drawing.Imaging.ImageFormat.Gif);
Msdn for more.
I would try converting the image to a compressed jpeg. The nice thing about jpegs is that you can set how high the quality should be (i.e. how much you want it compressed):
Note: quality should be between 1 and 100 (100 being the largest size/highest quality and 1 being the smallest size/lowest quality.
public void save(string filename, Bitmap img, int quality)
{
// quality encoding
EncoderParameter qualParam = new EncoderParameter(Encoder.Quality, quality);
// code for jpeg image type
ImageCodecInfo jpegCodec = FindEncoderInfo("image/jpeg");
EncoderParameters encoderParams = new EncoderParameters(1);
encoderParams.Param[0] = qualParam;
img.Save(filename, jpegCodec, encoderParams);
}
private ImageCodecInfo FindEncoderInfo(string mimeType)
{
// search through all codecs for all formats
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
for (int i = 0; i < codecs.Length; i++)
{
if (codecs[i].MimeType == mimeType)
{
return codecs[i];
}
}
return null;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With