Table of Contents

Method TakeImage

Namespace
DotNetBrowser.Browser
Assembly
DotNetBrowser.dll

TakeImage()

Creates and returns an image of the currently loaded web page.

Bitmap TakeImage()

Returns

Bitmap

a Bitmap that contains the image of the currently loaded web page.

Remarks

The bitmap size depends on the size of the current browser instance and the device scale factor of the display where it is located at the moment. If the current browser size is empty, then the bitmap will be empty as well.

For example, if the device scale factor of the display where the browser instance is located at the moment is 2.0 and the browser size is 100x100, then the size of the bitmap is expected to be 200x200.

Exceptions

ObjectDisposedException

The IBrowser has already been disposed.

ConnectionClosedException

The connection to the Chromium engine is closed.

BitmapTimeoutException

The Bitmap can not be retrieved within 10 seconds.