Class library usage, coding and language questions.
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
Is there a difference in CaptureImage and CaptureCompressedImage? I have tried following code:
Bitmap img = Imaging.CaptureImage(Host.Local);
Bitmap img2 = Imaging.CaptureCompressedImage(Host.Local);
Bitmap b = Host.Local.CaptureCompressedImage();
And all files have the same size. Am I using the methods wrong or is there a bug in Ranorex?
- Site Admin
- Posts: 11938
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Yes there is a difference. Although the difference in size appears only during runtime.
To get a compressed image during runtime you have to use a CompressedImage object instead of an Bitmap object. After saving or storing the image or compressed image,respectively, they have the same size (provided that you do not specify another ImageFormat than PNG as second argument to the Bitmap.Save
Ranorex Support Team