The new ImageBitmapRenderingContext
can be used standalone for some conversion purposes, e.g. ImageBitmap -> Blob via simply transferring it to a canvas ImageBitmapRenderingContext then calling toBlob()
on the canvas.
However it would be much more useful for efficient conversion if it also had getImageData
like the 2D context. This would enable efficient and asynchronous conversion like Blob -> ImageData. Currently even with ImageBitmapRenderingContext, it is still necessary to draw the ImageBitmap to a 2D context in order to call getImageData
. If ImageBitmapRenderingContext can be used for conversion to Blob, it seems it ought to have the method to do conversion to ImageData, too.
I can’t easily find a github/issues list for the spec for this, so I’m just posting this here.