At the very least: * Cannot create ImageBitmap with a negative width or height -> should be a minor fix * createImageBitmap with HTMLVideoElement is not implemented -> bug 182388 * createImageBitmap with OffscreenCanvas is not implemented -> should be a minor fix; OffscreenCanvas::transferToImageBitmap() does something similar * createImageBitmap with SVGImageElement is not implemented * createImageBitmap with ImageData is not implemented -> needs to integrate mime sniffing code somehow * createImageBitmap with Blob is not implemented -> needs to integrate mime sniffing code somehow
spec: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-createimagebitmap
+1
Is the "premultiplyAlpha" option supported? It looks like WebGL gets unpremultiplied data when specifying that option, it's hard to find up-to-date documentation, and it's difficult to feature detect the supported ImageBitmapOptions.
The image is still getting mutated a little when createImageBitmap is used in Safari. I store data in an RGBA encoded image, so any changes causes errors. It seems like the default setting is not entirely "premultiply", nor is it "none". For now, if browser detects it's safari, I have to use a polyfill to avoid image manipulation: if (!('createImageBitmap' in window) || isSafari) { window.createImageBitmap = async function (blob) { return new Promise((resolve, reject) => { const img = document.createElement('img') img.addEventListener('load', function () { resolve(this) }) img.src = URL.createObjectURL(blob) img.deleteURL = function () { URL.revokeObjectURL(this.src) } }) } }