-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
The ImageBitmapSource union is defined as,
typedef (HTMLImageElement or
SVGImageElement) HTMLOrSVGImageElement;
typedef (HTMLOrSVGImageElement or
HTMLVideoElement or
HTMLCanvasElement or
ImageBitmap or
OffscreenCanvas) CanvasImageSource;
typedef (CanvasImageSource or
Blob or
ImageData) ImageBitmapSource;
This specification does not have cases covering the Blob, OffscreenCanvas or SVGImageElement cases for this union. The implementation in Chromium handles OffscreenCanvas in the most obvious fashion but not the other two.
Handling of Blob inputs is particularly tricky because it requires first decoding the blob. For practical purposes developers should simply call createImageBitmap() with the Blob and pass the resulting ImageBitmap to the detect() method.
It may be best to simply redefine handling of this union in terms of createImageBitmap().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels