ImageBitmap.idl 1.0 KB

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