Update cli/src/codecs.js

This commit is contained in:
Ingvar Stepanyan
2020-12-08 19:12:14 +00:00
committed by GitHub
parent aff137218d
commit 4e4778397f

View File

@@ -344,9 +344,7 @@ export const codecs = {
await oxipngPromise; await oxipngPromise;
return { return {
encode: (buffer, width, height, opts) => { encode: (buffer, width, height, opts) => {
const simplePng = new Uint8Array( const simplePng = pngEncDec.encode(new Uint8Array(buffer), width, height);
pngEncDec.encode(new Uint8Array(buffer), width, height),
);
return oxipng.optimise(simplePng, opts.level); return oxipng.optimise(simplePng, opts.level);
}, },
}; };