convertToBlob

suspend fun convertToBlob(options: ImageEncodeOptions = definedExternally): Blob(source)

The OffscreenCanvas.convertToBlob() method creates a Blob object representing the image contained in the canvas.

MDN Reference