@abasb75/turbojpeg-codec
v3.0.4
Published
libjpeg-turbo for browsers
Downloads
73
Readme
@abasb75/turbo-jpeg (decoder and encoder)
JS/WebAssembly build of libjpeg-turbo
Using generated Javascript File:
- install From
npm
:
npm i --save @abasb75/turbojpeg-codec
- import
@abasb75/turbojpeg-codec
:
import TurboJPEGWasm from '@abasb75/turbojpeg-codec'
...
let decoder,encoder;
TurboJPEGWasm().then(function(turboJpeg) {
decoder = new turboJpeg.JPEGDecoder();
encoder = new turboJpeg.JPEGEncoder();
});
...
Decode
import {decode} from "@abasb75/turbojpeg-codec";
const decoded = await decode(arrayBuffer); // ArrayBuffer
console.log('decoded',decoded);
Only decoder versions:
3.0.4-decoder
For see example you can use this link