API Reference > imodeljs-frontend > Views > Viewport > readImageToCanvas readImageToCanvas Method Reads the current image from this viewport into an HTMLCanvasElement with a Canvas2dRenderingContext such that additional 2d graphics can be drawn onto it. readImageToCanvas(): HTMLCanvasElement see Viewport.readImage to obtain the image as a JPEG or PNG. Returns - HTMLCanvasElement Defined in core/frontend/src/Viewport.ts Line 2438 Last Updated: 11 June, 2024