Screenshots as jpg
Screenshots as jpg
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.
- Attachments
-
- Test.rxrec
- This is the test module where the code is implemented
- (1.21 KiB) Downloaded 62 times
-
- Test.UserCode.cs
- This is where I'm implementing captureScreentshot()
- (1.26 KiB) Downloaded 92 times
-
- BaseTestCase.cs
- This contain my custom function for capturing screenshots called captureScreenshot()
- (46.72 KiB) Downloaded 88 times
Re: Screenshots as jpg
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:
It seems the Bitmap.Save is a system drawing method, where default output format is PNG

Code: Select all
bitmap.Save(screenshotPath,System.Drawing.Imaging.ImageFormat.Jpeg);
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Screenshots as jpg
Nice to hear that
You are welcome.

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration