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;
return {
encode: (buffer, width, height, opts) => {
const simplePng = new Uint8Array(
pngEncDec.encode(new Uint8Array(buffer), width, height),
);
const simplePng = pngEncDec.encode(new Uint8Array(buffer), width, height);
return oxipng.optimise(simplePng, opts.level);
},
};