CaptureCompressedImage returns null
Posted: Tue Sep 20, 2016 10:13 am
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;
}
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;
}