Page 1 of 1

Screenshots as jpg

Posted: Tue Oct 11, 2016 8:16 pm
by mander95
I saved the screenshots that I take with my automation as jpgs but when I try to read it on another computer, a Warning occurs where it states that the files were actually png files with jpg extensions. Is there a way to fix the way the files are saved.

Re: Screenshots as jpg

Posted: Wed Oct 12, 2016 8:03 am
by odklizec
Hi,

It seems the Bitmap.Save is a system drawing method, where default output format is PNG ;) What you need to do is to specify the target format date, like this:

Code: Select all

bitmap.Save(screenshotPath,System.Drawing.Imaging.ImageFormat.Jpeg);

Re: Screenshots as jpg

Posted: Thu Oct 13, 2016 5:35 pm
by mander95
it works, thank you :D :D :D :D :D :D

Re: Screenshots as jpg

Posted: Fri Oct 14, 2016 7:30 am
by odklizec
Nice to hear that ;) You are welcome.