Hacker News new | ask | show | jobs
by jchw 208 days ago
I don't think so: JPEG 2000, as far as I know, isn't generally supported for web use in web browsers, but it is supported in PDF.
3 comments

> I don't think so: JPEG 2000, as far as I know, isn't generally supported for web use in web browsers, but it is supported in PDF.

Safari supported JPEG 2000 since 2010 but removed support last year [1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=178758

So Firefox (or others) can't open a pdf with a embedded jpeg-2000/XL? Or does pdf.js somehow support it?
Apparently I really flubbed my wording for this comment. I'm saying they do support it inside of PDF, just not elsewhere in the web platform.
JPEG-XL is recommended as the preferred format for HDR content for PDFs, so it’s more likely to be encountered:

https://www.theregister.com/2025/11/10/another_chance_for_jp...

I'm not convinced HDR PDFs will be a common thing anytime soon, even without this chicken and egg problem of support
What I mean to say is, I believe browsers do support JPEG 2000 in PDF, just not on the web.
the last time that I check it, I find that I need to convert to Jpeg to show the image in browsers.
A *PDF* with embedded JPEG 2000 data should, as far as I know, decode in modern browser PDF viewers. PDF.js and PDFium both are using OpenJPEG. But despite that, browsers don't currently support JPEG 2000 in general.

I'm saying this to explain how JPEG XL support in PDF isn't a silver bullet. Browsers already support image formats in PDF that are not supported outside of PDF.