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