Truly independent web browser
// https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#images-2
[Exposed=(Window,Worker), Serializable, Transferable, ImplementedIn=Rust]
interface ImageBitmap {
readonly attribute unsigned long width;
readonly attribute unsigned long height;
undefined close();
};
// https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmapsource
typedef (CanvasImageSource or
Blob or
ImageData) ImageBitmapSource;
// INTEROP: Chromium and WebKit still accept the legacy "none" orientation.
enum ImageOrientation { "from-image", "flipY", "none" };
enum PremultiplyAlpha { "none", "premultiply", "default" };
enum ColorSpaceConversion { "none", "default" };
enum ResizeQuality { "pixelated", "low", "medium", "high" };
dictionary ImageBitmapOptions {
ImageOrientation imageOrientation = "from-image";
// FIXME: PremultiplyAlpha premultiplyAlpha = "default";
ColorSpaceConversion colorSpaceConversion = "default";
[EnforceRange] unsigned long resizeWidth;
[EnforceRange] unsigned long resizeHeight;
ResizeQuality resizeQuality = "low";
};