ImageBitmap.idl 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. #import <FileAPI/Blob.idl>
  2. #import <HTML/ImageData.idl>
  3. #import <HTML/CanvasRenderingContext2D.idl>
  4. #import <HTML/Canvas/CanvasDrawImage.idl>
  5. // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#images-2
  6. [Exposed=(Window,Worker), Serializable, Transferable]
  7. interface ImageBitmap {
  8. readonly attribute unsigned long width;
  9. readonly attribute unsigned long height;
  10. undefined close();
  11. };
  12. // https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmapsource
  13. typedef (CanvasImageSource or
  14. Blob or
  15. ImageData) ImageBitmapSource;
  16. enum ImageOrientation { "from-image", "flipY" };
  17. enum PremultiplyAlpha { "none", "premultiply", "default" };
  18. enum ColorSpaceConversion { "none", "default" };
  19. enum ResizeQuality { "pixelated", "low", "medium", "high" };
  20. dictionary ImageBitmapOptions {
  21. // FIXME: ImageOrientation imageOrientation = "from-image";
  22. // FIXME: PremultiplyAlpha premultiplyAlpha = "default";
  23. // FIXME: ColorSpaceConversion colorSpaceConversion = "default";
  24. // FIXME: [EnforceRange] unsigned long resizeWidth;
  25. // FIXME: [EnforceRange] unsigned long resizeHeight;
  26. // FIXME: ResizeQuality resizeQuality = "low";
  27. };