Page 1 of 1

CaptureCompressedImage returns null

Posted: Tue Sep 20, 2016 10:13 am
by Thor.Irgens
Hi,

I have a problem with CaptureCompressedImage(), it returns null on an adapter that has width, height and an anchor (X,Y).

Does anyone have a similar experience and hopefully solution?

I have previously experienced that objects are sent to Garbage Collector, but that would set the height, width, X and Y values to 0. Now those values are not set to 0 but the capture still fails. The bit that should be captured is clearly visible on the screen.

I am running on Virtual Machine (Windows 8.1) using Ranorex 6.0.1.

Here is a code snippet of the code I use

Rx.CompressedImage cpi = Adapter.CaptureCompressedImage();
if (cpi == null)
{
Log.WriteLine("cpi resulted in null. Adapter info is {0},{1},{2},{3}.", Adapter.ScreenRectangle.Width, Adapter.ScreenRectangle.Height, Adapter.ScreenRectangle.X, Adapter.ScreenRectangle.Y);
return false;
}

Re: CaptureCompressedImage returns null

Posted: Fri Sep 23, 2016 9:20 am
by Support Team
Hi Thor.Irgens,

Unfortunately I'd need additional information about the object itself. Therefore, it would be great if you could upload a Ranorex Snapshot.

PS: If you don't want to upload the snapshot to this public forum, you can send it to [email protected] for further analysis.

Thank you in advance.

Regards,
Markus (S)