Click here to Skip to main content
15,901,426 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have to take screen shots of instalation of any software in local machine. I used psr.exe to take all the screen shots with installation steps.
The output of psr is an .mht file. I will open the mht file and convert .mht file to .txt file and extract all images and texts.
but the quality of images is not good as we get the images through normal print screen button. Do we have any methods to improve the image quality ?

// for run psr.exe //
//Starts PSR recording
               ProcessStartInfo p = new ProcessStartInfo();
               p.FileName = "psr.exe";
               p.Arguments = "/start /output " + @Output + "\\ /maxsc 100 /gui 0";

//for convert and save as image//

 // Convert Base64 String to byte[]
                byte[] imageBytes = Convert.FromBase64String(strFullpathNew);
                MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);

                // Convert byte[] to Image
                ms.Write(imageBytes, 0, imageBytes.Length);
                System.Drawing.Image image = System.Drawing.Image.FromStream(ms, true);

                //return image;

                var newImage = ScaleImage(image, 715, 521);

                image.Save(SourcesdirectoryPath + "\\" + "Image" + (i + 1) + ".Jpeg", ImageFormat.Jpeg);

Please suggest a method to get the image with good quality.
Thanks in advance
Updated 11-Jan-16 1:26am
Andy Lanng 11-Jan-16 6:58am    
Just like on CSI: Just enhance the image!
PS. You can't just enhance the image. You need to start with a better quality one
Renjith_R 11-Jan-16 7:05am    
thanks for the reply, But how we enhance the image quality ?
do you have any link or code snippet for reference.

Thanks in advance
Andy Lanng 11-Jan-16 7:20am    
please read the PS of the comment
Sergey Alexandrovich Kryukov 11-Jan-16 10:07am    
You generally cannot. And it makes no sense at all.
You don't need any link or code snippet.

1 solution

CSI and NCIS etc. image enhancement is fiction: you cannot enhance an image to create detail that was not in the original image. Particularly when the original is a screenshot which is basically a pixel-by-pixel copy of the screen.
If the application you are using to take the images, produces rubbish, get another one!
You can do it manually with the PrintScreen button, and post process that in any graphics package, or there are specific applications which will capture the screen on a hot key - Corel ScreenCap for example. Google will find you plenty of them, I'm sure.

One other point you should be aware of: if you want to process images in any way, store them in an uncompressed (bitmap) or non-lossy compressed (PNG) format - avoid JPG or JPEG like the plague. Every time you save a JPG file, you throw away more info which cannot be recovered. This doesn't happen with BMP or PNG files.
Share this answer
Andy Lanng 11-Jan-16 8:14am    
Thanks for making the point clear. 5*
Renjith_R 11-Jan-16 11:09am    
Thanks for the reply, Do we have any method to 10% decrease in brightness and 10% increase in contrast ? This will help me a lot
Thanks in advance

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900