Click or drag to resize

IBrowserTakeImage Method

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

Namespace:  DotNetBrowser.Browser
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.25.1
Syntax
C#
Bitmap TakeImage()

Return Value

Type: Bitmap
a Bitmap that contains the image of the currently loaded web page.
Exceptions
ExceptionCondition
ObjectDisposedExceptionThe IBrowser has already been disposed.
ConnectionClosedExceptionThe connection to the Chromium engine is closed.
BitmapTimeoutExceptionThe Bitmap can not be retrieved within 10 seconds.
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.

See Also