JS/WebAssembly build of CharLS
- install From
npm
:
npm i --save @abasb75/charls
- import
@abasb75/charls
:
import CharLSWasm from '@abasb75/charls'
...
let decoder,encoder;
CharLSWasm().then(function(charlsjs) {
decoder = new charlsjs.JpegLSDecoder();
encoder = new charlsjs.JpegLSEncoder();
});
...
import {decode} from "@abasb75/charls";
const decoded = await decode(arrayBuffer); // ArrayBuffer
console.log('decoded',decoded);
For see example you can use this link