2022-10-07 16:45:09 -06:00
|
|
|
// https://html.spec.whatwg.org/multipage/canvas.html#imagedata
|
2024-03-23 21:45:59 +01:00
|
|
|
|
|
|
|
enum PredefinedColorSpace { "srgb", "display-p3" };
|
|
|
|
|
|
|
|
dictionary ImageDataSettings {
|
2024-09-10 16:21:16 +09:00
|
|
|
PredefinedColorSpace colorSpace;
|
2024-03-23 21:45:59 +01:00
|
|
|
};
|
|
|
|
|
2022-10-07 16:45:09 -06:00
|
|
|
[Exposed=(Window,Worker), Serializable]
|
2020-06-21 15:57:10 +02:00
|
|
|
interface ImageData {
|
2024-03-23 21:45:59 +01:00
|
|
|
constructor(unsigned long sw, unsigned long sh, optional ImageDataSettings settings = {});
|
2024-03-26 14:31:32 +01:00
|
|
|
constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh, optional ImageDataSettings settings = {});
|
2020-06-21 15:57:10 +02:00
|
|
|
readonly attribute unsigned long width;
|
|
|
|
readonly attribute unsigned long height;
|
|
|
|
readonly attribute Uint8ClampedArray data;
|
2025-02-26 11:14:13 -07:00
|
|
|
readonly attribute PredefinedColorSpace colorSpace;
|
2020-12-09 21:26:42 +00:00
|
|
|
};
|