Summary: | =media-gfx/imagemagick-6.8.8.5: jpeg2k (media-libs/openjpeg:2) support broken | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexander Miller <alex.miller> |
Component: | Current packages | Assignee: | Gentoo Graphics Project <graphics+disabled> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nikoli |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=25362 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 500580, 501706 | ||
Attachments: |
enable jpeg2000 compression in pdf files
don't use opj_stream_destroy_v3, fixes linking imagemagick-6.8.8.10-enable-openjp2-delegate-in-pdf-encoder.patch |
Description
Alexander Miller
2014-03-07 04:56:16 UTC
Created attachment 371938 [details, diff]
don't use opj_stream_destroy_v3, fixes linking
I think the last sentence in comment #0 was too ambiguous: > The attached patches fix both bugs, at least they work for me. I was talking about the two errors I described first, not the gentoo bugs (which may be fixed, too, but I didn't test). I should have written: * The second patch fixes the "convert test.png test.jp2" case for me (and probably the two gentoo bugs, too). * The first patch fixes the pdf case for me. Comment on attachment 371936 [details, diff]
enable jpeg2000 compression in pdf files
This patch is part of upstream release 6.8.8-8 which I'm adding to Portage now.
fixed in 6.8.8.8, added your patch in, this needs to be reported upstream! (In reply to Samuli Suominen from comment #5) > reported here: > > http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=25362 and upstream committed a fix to the subversion :) Created attachment 374512 [details, diff] imagemagick-6.8.8.10-enable-openjp2-delegate-in-pdf-encoder.patch jpeg2000 compression in PDF files is still broken in imagemagick-6.8.8.10. In comment #3 Samuli wrote that the patch from attachment 371936 [details, diff] is part of upstream release 6.8.8-8. This is not correct. Only one file was fixed in that release, the part of the patch which is important for this bug is *not* part of 6.8.8-8 (or 6.8.8-10). I've created a patch with the missing pieces. Here is what hat I did to test imagemagick-6.8.8.10: $ convert test.png -compress jpeg2000 -quality 35 test.pdf convert: delegate library support not built-in `test.pdf' (JP2) @ error/pdf.c/WritePDFImage/1283. $ pdfimages -list test.pdf page num type width height color comp bpc enc interp object ID --------------------------------------------------------------------- 1 0 image 2481 3500 rgb 3 8 image no 8 0 $ ls -ks1 test.{png,pdf} 4012 test.pdf 3136 test.png As you can see, jpeg2000 compression is not used. Instead I get a large file with RLE compression. The same commands after rebuilding with my patch: $ convert test.png -compress jpeg2000 -quality 35 test.pdf $ pdfimages -list test.pdf page num type width height color comp bpc enc interp object ID --------------------------------------------------------------------- 1 0 image 2481 3500 rgb 3 8 jpx no 8 0 $ ls -ks1 test.{png,pdf} 584 test.pdf 3136 test.png It works! The "enc" column shows "jpx" and the file is much smaller. You may want to send this patch upstream, too. (In reply to Alexander Miller from comment #7) > Created attachment 374512 [details, diff] [details, diff] > imagemagick-6.8.8.10-enable-openjp2-delegate-in-pdf-encoder.patch > > jpeg2000 compression in PDF files is still broken in imagemagick-6.8.8.10. ouch. reported here, http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=25376 will bump in Portage after morning coffee :p (In reply to Samuli Suominen from comment #8) > (In reply to Alexander Miller from comment #7) > > Created attachment 374512 [details, diff] [details, diff] [details, diff] > > imagemagick-6.8.8.10-enable-openjp2-delegate-in-pdf-encoder.patch > > > > jpeg2000 compression in PDF files is still broken in imagemagick-6.8.8.10. > > ouch. reported here, > http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=25376 upstream says he applied your patch :) http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=25376&sid=4087a8d28aa34175d395029d8e6ea340#p110065 > will bump in Portage after morning coffee :p done. 6.8.8.10-r1 |