Closed Charuru closed 4 years ago
Hello. You could check https://brunsli.dev/test.html On this page ServiceWorker upgrades the HTTP request so that nginx plugin sends compressed file instead of original. When response arrives, ServiceWorker decodes it and passes as JPEG to browser.
Using up WASM is usually simple:
CC
and CXX
environment variables to point to emcc
and em++
Please refine the question, if I got it wrong.
Thanks, the question was about how to upload a compressed file with image data from canvas instead of compressing on the server.
With current API it could be done in 2 steps:
canvas.toDataURL('image/jpeg', quality / 100.0);
, then decode base64 payload to bytes
Can we have some instructions on how to setup wasm to do this please?