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