mirror of
https://github.com/denoland/deno.git
synced 2025-02-19 03:43:00 -05:00

Fixes #19288 Adds the `ImageData` Web API. This would be beneficial to projects using `ImageData` as a convenient transport layer for pixel data. This is common in Web Assembly projects that manipulate images. Having this global available in Deno would improve compatibility of existing JS libraries. **References** - [MDN ImageData Web API](https://developer.mozilla.org/en-US/docs/Web/API/ImageData) - [whatwg HTML Standard Canvas Spec](https://html.spec.whatwg.org/multipage/canvas.html#pixel-manipulation)
2 lines
95 B
TypeScript
2 lines
95 B
TypeScript
const data = new ImageData(2, 2, { colorSpace: "display-p3" });
|
|
postMessage(data.data.length);
|