Bug 691346

Summary: JPXDecoder: also accept J2K content streams
Product: MuPDF Reporter: zeniko
Component: fitzAssignee: Tor Andersson <tor.andersson>
Status: RESOLVED FIXED    
Severity: normal CC: sebastian.rasmussen
Priority: P4    
Version: unspecified   
Hardware: PC   
OS: Windows 7   
URL: http://code.google.com/p/sumatrapdf/issues/detail?id=937
Customer: Word Size: ---

Description zeniko 2010-05-28 15:58:54 UTC
The JPXDecoder currently accepts JPEG2000 images not however plain content streams. For reference: Content streams start with 0xFF4F and require the CODEC_J2K decoder.

See the URL for a document not currently rendering with MuPDF.
Comment 1 Sebastian Rasmussen 2010-06-14 08:06:34 UTC
Just to alleviate the confusion: zeniko means JPEG-2000 code streams.
JPEG-2000 encoded content streams would not really make any sense. :)

In addition I found the following quote in pdfref17.pdf, page 87:
"The JPXDecode filter expects to read a full JPX file structure -- 
either internal to the PDF or as an external file."

To me it sounds like the .pdf could be invalid, but it seems as if
it would be easy enough to peek the first word and handle this case
as well. Tor, what do you say..?