skia2/specs/web-img-decode
Kevin Lubick d6b32ed39d [img-decode] Start on proposed new spec
This adds readPixel and a partial stub of window.createImageData

Change-Id: Iee992312b9331b71852fe2198f844a7e4ae9e963
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211344
Reviewed-by: Mike Reed <reed@google.com>
2019-05-06 17:39:19 +00:00
..
current [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
proposed [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
README.md

JS image decode

Background

It is currently cumbersome to go from an encoded Blob or ArrayBuffer of image bytes to an ImageData (Uint8ClampedArray) for further image processing. See current/index.html for an example where a user can select an image from disk and have JS turn it into a grayscale version (no backend server).

Proposal

We propose... See proposed/index.html for an API that makes this much cleaner. It uses the CanvasKit WASM library under the hood to provide functionality, but the intent is for Web Browsers to support this natively.