kleisauke / wasm-vips

libvips for the browser and Node.js, compiled to WebAssembly with Emscripten.
https://kleisauke.github.io/wasm-vips/
MIT License
463 stars 25 forks source link

Certain parameters on `jpegSaveBuffer` ignored #27

Closed lokiiarora closed 1 year ago

lokiiarora commented 1 year ago

Certain parameters on jpegSaveBuffer operation are ignored and I can't seem to find why that's the case? If you could help me figure out what the bug I might be, I could help contribute?

(process:42): VIPS-WARNING **: 01:55:30.646: ignoring quant_table

(process:42): VIPS-WARNING **: 01:55:30.865: ignoring trellis_quant

(process:42): VIPS-WARNING **: 01:55:30.865: ignoring overshoot_deringing

(process:42): VIPS-WARNING **: 01:55:30.866: ignoring optimize_scans
kleisauke commented 1 year ago

Hello, these settings can only be used when libvips was compiled with MozJPEG - see: https://www.libvips.org/API/current/VipsForeignSave.html#vips-jpegsave

The forthcoming wasm-vips v0.0.4 will switch from libjpeg-turbo to MozJPEG (commit https://github.com/kleisauke/wasm-vips/commit/cbcf75288839c3ac2313f6f8c679ee95587fe76c).

lokiiarora commented 1 year ago

Thank you so much, are there build instructions for the same? I wanted to build it on my system and have the changes vetted with our downstream packages?

kleisauke commented 1 year ago

v0.0.4 is now available. For building yet-to-be-released versions, you can use the build command available in package.json. https://github.com/kleisauke/wasm-vips/blob/4584bd9fe872b068f6fc8f4a8cfda918d79be68c/package.json#L40

That requires Docker and a Unix-like environment (due to the use of $(pwd)).

lokiiarora commented 1 year ago

Thanks @kleisauke