[wp-trac] [WordPress Trac] #39216: PDFs with non-opaque alpha channels can result in previews with black backgrounds.
WordPress Trac
noreply at wordpress.org
Mon Dec 19 15:09:48 UTC 2016
#39216: PDFs with non-opaque alpha channels can result in previews with black
backgrounds.
-------------------------------------------------+-------------------------
Reporter: gitlost | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Media | Review
Severity: normal | Version: 4.7
Keywords: dev-feedback 2nd-opinion has-patch | Resolution:
has-unit-tests | Focuses:
-------------------------------------------------+-------------------------
Comment (by gitlost):
Hi, thanks for responding. Yes you're right the
`Imagick::unsharpMaskImage()` CMYK issue is distinct from the alpha
channel issue, as it applies to any jpeg with a CMYK color space, so I'll
split it off into a new ticket and refresh the patch here without it. The
noticeable color change for CMYK PDFs issue still remains though.
Was messing about with ImageMagick's "delegate.xml"
("/etc/ImageMagick-6/delegate.xml" on Ubuntu 16.10) and found that if on
the `decode="ps:cmyk"` line you change `-sDEVICE=pam` to `-sDEVICE=jpeg`
then both the CMYK and the alpha issues disappear and you get perfect
previews.
Similarly if on the `decode="ps:alpha` line you change `-sDEVICE=pngalpha`
to `-sDEVICE=jpeg` and add `-dUseCIEColor` then the alpha channel issue
disappears for the "test_alpha.pdf" uploaded here.
So there may be a way through Imagick to get the behaviour from
ImageMagick that one gets by calling GhostScript directly (where none of
these issues arises), but it's not easy to see. It's a bit like fishing
through a keyhole.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39216#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list