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