skia2/specs/web-img-decode
Kevin Lubick 29104528cc [infra] Port serve.py from Python2 to 3
These scripts are useful when testing WebAssembly locally
because the mimetype impacts how the binaries are loaded.

The porting was achieved by doing the following:
python -m lib2to3 -w -n serve.py


Change-Id: I09673fa881339a9b157c5fc993e190766efcd85e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/443884
Reviewed-by: Erik Rose <erikrose@google.com>
2021-08-31 15:28:19 +00:00
..
current [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
proposed [infra] Port serve.py from Python2 to 3 2021-08-31 15:28:19 +00:00
README.md [spec] Initial commit for web spec 2019-04-19 16:47:57 +00:00

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.