captureScreenshot
Takes a screenshot of the viewer in PNG format.
Example
Usage
const options = {
width: 1024,
height: 768
};
const imageDataPromise = viewer2d.captureScreenshot(options);Parameters
options
Options for the screenshot.
Type | Required |
|---|---|
Object | Yes |
Properties
Name | Type | Required | Description |
|---|---|---|---|
height | Number | Yes | Height of the screenshot in pixels |
width | Number | Yes | Width of the screenshot in pixels |
Return Value
Promise that resolves to the base64 encoded string of the PNG image.
Type |
|---|
Promise => String |