mirror of
https://github.com/denoland/deno.git
synced 2024-12-26 09:10:40 -05:00
8c0fb9003d
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);
|