Last modified: 2014-08-14 06:36:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61975, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59975 - PDF containing jpx/jp2 encoded images from Archive.org uploaded to Commons won't thumbnail
PDF containing jpx/jp2 encoded images from Archive.org uploaded to Commons wo...
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
wmf-deployment
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: ops
Depends on:
Blocks: 41037 41371
  Show dependency treegraph
 
Reported: 2014-01-12 18:00 UTC by Smuconlaw
Modified: 2014-08-14 06:36 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Smuconlaw 2014-01-12 18:00:55 UTC
I uploaded to the Wikimedia Commons the PDF "File:John Stuart Mill, Considerations on Representative Government (1st ed, 1861).pdf" (https://commons.wikimedia.org/wiki/File:John_Stuart_Mill,_Considerations_on_Representative_Government_(1st_ed,_1861).pdf) which I had downloaded from Archive.org, but none of the pages will thumbnail properly. I tried purging the page to no avail.

I reported this problem at the Commons Village Pump, and another editor said that when he tried to view the thumbnail at https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/John_Stuart_Mill%2C_Considerations_on_Representative_Government_%281st_ed%2C_1861%29.pdf/page1-76px-John_Stuart_Mill%2C_Considerations_on_Representative_Government_%281st_ed%2C_1861%29.pdf.jpg he encountered this error message:

"Error creating thumbnail: convert: no decode delegate for this image format `/tmp/magick-hg7YMuoz' @ error/constitute.c/ReadImage/532."
"convert: missing an image filename `/tmp/transform_b1c9d0271ec9-1.jpg' @ error/convert.c/ConvertImageCommand/3011."
Comment 1 Lupo 2014-01-12 20:47:40 UTC
That PDF contains jpx/jp2 encoded images. Presumably ImageMagic's convert lacks a JPEG 2000 decoder.
Comment 2 Lupo 2014-01-12 21:08:24 UTC
Or ImageMagick lacks the "advanced" JPEG2000 stuff. I see that is listed at https://en.wikipedia.org/wiki/JPEG_2000#Application_support as having only "basic" JPEG2000 support. The OpenJPEG library is listed as having the advanced stuff, but that was added to ImageMagick just a few days ago: http://www.imagemagick.org/script/changelog.php (2013-12-30).
Comment 3 Bawolff (Brian Wolff) 2014-01-13 04:10:14 UTC
(In reply to comment #2)
> Or ImageMagick lacks the "advanced" JPEG2000 stuff. I see that is listed at
> https://en.wikipedia.org/wiki/JPEG_2000#Application_support as having only
> "basic" JPEG2000 support. The OpenJPEG library is listed as having the
> advanced
> stuff, but that was added to ImageMagick just a few days ago:
> http://www.imagemagick.org/script/changelog.php (2013-12-30).

Its probably the old-ish version of ghost script we use's fault. gs converts to a jpeg file first, and then we use image magick to resize. gs would be the program responsible for interpreting the JPEG2000 stuff. The error message would mention convert, because convert would choke on the lack of input from gs erroring out (And no ghostscript error output as gs doesn't have its stderr redirected, only convert does, which is probably a mistake)
Comment 4 Bawolff (Brian Wolff) 2014-01-13 04:20:21 UTC
> (And no ghostscript error output as gs doesn't have its stderr
> redirected, only convert does, which is probably a mistake)

Making that side issue into bug 59986.
Comment 5 Bawolff (Brian Wolff) 2014-01-16 04:29:28 UTC
Locally, gs complains about invalid jpx blocks, but then ignores them and renders the image.

My local (fairly old) gs version is 8.71.
Comment 6 Bawolff (Brian Wolff) 2014-01-16 04:48:54 UTC
>(And no ghostscript error output as gs doesn't have its stderr
> redirected, only convert does, which is probably a mistake)

I misread the source code, gs errors should have been redirected, which implies that gs is exiting with no output and no errors, which is odd.

Maybe someone could run gs without the -q option to see if that makes a difference (but on my isntall, -q doesn't affect stderr output...). Also, anyone know the version of gs used on the servers?
Comment 7 Lupo 2014-08-14 06:36:18 UTC
Another example: [[:commons:File:Geneva Convention 1864 - CH-BAR - 29355687.pdf]]

Also contains jp2-encoded page images and won't thumbnail. File is nearly 100MB and contains 8 pages.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links