Add PNG encoding support
This commit is contained in:
@ -133,7 +133,10 @@ export default {
|
||||
},
|
||||
enc: async () => {
|
||||
await pngEncDecPromise;
|
||||
return { encode: (...args) => new Uint8Array(pngEncode(...args)) };
|
||||
return {
|
||||
encode: (buffer, ...args) =>
|
||||
new Uint8Array(pngEncode(new Uint8Array(buffer), ...args))
|
||||
};
|
||||
},
|
||||
defaultEncoderOptions: {}
|
||||
}
|
||||
|
1
codecs/png/Cargo.lock
generated
1
codecs/png/Cargo.lock
generated
@ -116,7 +116,6 @@ dependencies = [
|
||||
name = "squoosh-png"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"png",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user