Comments (3)
With current API it could be done in 2 steps:
canvas.toDataURL('image/jpeg', quality / 100.0);
, then decode base64 payload to bytes- pass bytes to Brunsli, like here: https://github.com/google/brunsli/blob/master/docs/index.html#L231
from brunsli.
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:
- follow the Emscripten instructions
- set
CC
andCXX
environment variables to point toemcc
andem++
- freshly configure and build with CMake
Please refine the question, if I got it wrong.
from brunsli.
Thanks, the question was about how to upload a compressed file with image data from canvas instead of compressing on the server.
from brunsli.
Related Issues (20)
- which type of ANS does brunsli use? HOT 3
- Is brunsli's ANS using static probability distributions? HOT 2
- Idea: https://brunsli.dev/split.html?progressive image resolution
- Add ratio to brunsli.dev
- brunsli.dev cannot decode JPEG compressed by recent cbrunsli.exe builds (CMake build 78 and newer) HOT 3
- [openSUSE] W: shared-lib-calls-exit from RPMLINT HOT 7
- core dumped when turn on Multithreading switch HOT 2
- File signature HOT 6
- CI: Add tests HOT 2
- HDR JPEG support? HOT 1
- Latest build? HOT 3
- Unable to finish the compress/decompress task when enables multithread mode on Android HOT 1
- Compiler is not EMSCRIPTEN HOT 1
- Add link to brunsli.dev in repository description and README HOT 2
- Mode without preserving structure of the original JPEG file HOT 3
- Arithmetic coded JPEG support HOT 2
- Brunsli cannot decode JPEG that was compressed in JPEG XL's reference software's unofficial build HOT 3
- Build with dyanmically loaded libraries
- What is the public API that should be exported? HOT 1
- Encoding is 10x slower with Safari HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brunsli.