readImageBuffer Method
Capture the image currently rendered in this viewport, or a subset thereof.
readImageBuffer(args?: ReadImageBufferArgs): undefined | ImageBuffer
Parameter | Type | Description |
---|---|---|
args | ReadImageBufferArgs | Describes the region to capture and optional resizing. By default the entire image is captured with no resizing. |
Returns - undefined | ImageBuffer
The image, or undefined
if the specified capture rect is not fully contained in [[viewRect], a 2d context could not be obtained, or the resultant image consists entirely
of 100% transparent background pixels.
Defined in
- core/frontend/src/Viewport.ts Line 2539
Last Updated: 30 November, 2023