Search code examples
google-chromepdfjpeg2000

Does Chrome support JPEG 2000 decoding?


Reading question on SO such as this one, makes me wonder how Chrome can support PDF ≥ 1.7 (which can contains JPEG 2000 codestream), while at the same time claims that it does not support JPEG 2000:

What is the trick here ?


Solution

  • It's because PDFs in Chrome are rendered with PDFium, which does support JPEG2000 while HTML is rendered using Blink, which does not.

    The issue has already been discussed here:

    In particular comment #4 makes the following observation:

    Chrome already has JPEG2000 support and includes openjpeg library for its PDF reader and has to deal with its fuzzing/security issues anyway so the actually supporting it like Safari is not opening a new attack surface and doesn't cost binary size also I'd guess.

    Same goes here:

    PDF is not part of the standard web platform, it is a plugin, so it is out of scope. However, I agree with you that it seems silly to support this in one context and not in another.

    Full thread on blink-dev: