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

JPEG 2000 Support #57

Closed Logicer16 closed 4 weeks ago

Logicer16 commented 8 months ago

I've been trying saving to the various image formats supported by libvips and most work without issue.

However, when I try to save to a JPEG 2000, I get the error:

no such operation jp2ksave_buffer
VipsOperation: class "jp2ksave_buffer" not found

I'd assume this is due to JPEG 2000 support not currently being built into the binary. Would it be possible to add support for JPEG 2000? Thanks.

kleisauke commented 8 months ago

This is indeed due to missing support for JPEG 2000. OpenJPEG needs to be compiled for WebAssembly to support this format.

I currently don't see this as a short-term consideration. In my opinion, JPEG 2000 has no real benefits; it primarily serves as a compatibility solution for legacy software that still uses it.

kleisauke commented 4 weeks ago

I'll close this as "won't fix". Safari was the only browser to provide support for this feature, and it is removing support in version 18. For more details, see: https://webkit.org/blog/15443/news-from-wwdc24-webkit-in-safari-18-beta/#images