0

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 ?

malat
  • 12,152
  • 13
  • 89
  • 158
  • Your question is specifically "how" Chrome can handle PDF files containing JPEG2000 images? Which is different from "Does Chrome support JPEG 2000 decoding?". – Ryan Jan 21 '21 at 23:23
  • Engineering team implemented JPEG 2000 support, but only as an implementation detail for PDF rendering, and not for image handling ... which seems suprising. – malat Jan 22 '21 at 09:37

1 Answers1

1

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:

malat
  • 12,152
  • 13
  • 89
  • 158
Brian Burton
  • 3,648
  • 16
  • 29