Bug 692820 - JPX decoding problems
Summary: JPX decoding problems
Status: RESOLVED WORKSFORME
Alias: None
Product: Bug Tracker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All All
: P4 major
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 22:55 UTC by Felix Buenemann
Modified: 2012-01-28 16:08 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Buenemann 2012-01-27 22:55:33 UTC
Decoding a specific PDF 1.6 file generated by InDesign CS3 5.0.4 / Adobe PDF Library 8.0 fails with lots of these errors:

   **** Warning: File has insufficient data for an image.
error: cannot decode code stream
unable to decode JPX image data.

Decoding fails on:
Debian Squeeze x86_64, gs 8.71, libjasper 1.900.1
Ubuntu 11.10 i386, gs 9.04, libjasper 1.900.1
Mac OS X 10.7.1 x86_64, gs 9.02, libjasper 1.900.1

Decoding works on:
Debian Lenny i386, gs 8.62 (according to ldd libjasper is not dynamically linked).

URL to the problematic file (~8 MB):
http://www.engelkemper.de/pdf/kataloge/fachtechnik/cem-bear.pdf
Comment 1 Alex Cherepanov 2012-01-28 07:10:15 UTC
Thank you for using and testing Ghostscript.

I cannot reproduce this on vv. 9.01, 9.02, or 9.04 compiled from sources
on AMD64 Linux with a compiled-in Jasper.

Vv. 8.71 and 9.00 fail on 2nd page with "/rangecheck in --run--".

In any case, the upcoming release, v. 9.05, will use OpenJpeg library
instead of Jasper. This version also works fine.

This bug report may indicate a problem with a dynamic libraries, but it
is moot now, when Jasper is about to be replaced.
Comment 2 Felix Buenemann 2012-01-28 15:22:25 UTC
The affected versions all used a dynamically linked libjasper 1.900.1, what version is the built-in libjasper?
Comment 3 Ken Sharp 2012-01-28 15:32:14 UTC
(In reply to comment #2)
> The affected versions all used a dynamically linked libjasper 1.900.1, what
> version is the built-in libjasper?

I believe the JasPer supplied with, and normally used in, Ghostscript contains additional patches to the last released version of JasPer. I also understand these patches have been supplied to the JasPer developers.

I would suggest either rebuilding Ghostscript using the supplied JasPer source instead of dynamically linking, or waiting until the next release (9.05) is available, which will be in a few weeks.
Comment 4 Alex Cherepanov 2012-01-28 15:51:24 UTC
Ghostscript comes with JasPer 1.701.0-gs5
Comment 5 Hin-Tak Leung 2012-01-28 16:08:10 UTC
(In reply to comment #2)
> The affected versions all used a dynamically linked libjasper 1.900.1, what
> version is the built-in libjasper?

I believe out of all the bundled libraries, zlib, libpng, freetype, are more or less as upstream; libjpeg has a small number of enhancements/bug-fixes which were not taken up by upstream; the same probably applies to some of the other libraries (libtiff, libcms/libcms2); libjasper is the one which contains subtantial enhancements/bug-fixes which were not taken up by upsteam.