[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 10 21:56:09 UTC 2018


#39216: PDFs with non-opaque alpha channels can result in previews with black
backgrounds.
-------------------------------------------------+-------------------------
 Reporter:  gitlost                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Media                                |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback 2nd-opinion has-patch   |     Focuses:
  has-unit-tests                                 |
-------------------------------------------------+-------------------------

Comment (by emirpprime):

 We've just upgraded ~20 servers to Debian 9 from Deb7/8 and been bitten by
 this. Unfortunately in all the testing no-one happened to upload a PDF
 with transparency in it.

 So far, modifying the {{{decode="ps:alpha}}} line in
 {{{/etc/ImageMagick-6/delegates.xml}}} from {{{-sDEVICE=pngalpha}}} to
 {{{-sDEVICE=jpeg}}} has fixed it.

 ----

 Original error shown in wp-admin (when using Regenerate Thumbnails plugin,
 otherwise only error is black images):
 {{{
 #!div style="max-width: 100%"
 ERROR: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER
 -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0
 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4
 '-r128x128' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-
 7338Pz_rSv55v5nG%d' '-f/tmp/magick-7338lWRCG1kb4w9Z' '-f/tmp/magick-
 7338WA7HNhRpf3Uj'' (-1) @ error/delegate.c/ExternalDelegateCommand/462
 }}}

 System info:
 {{{
 Debian 9, PHP7.2, Apache 2.4
 }}}

 Media Debugging Info:
 {{{
 Active Editor   WP_Image_Editor_Imagick
 Imagick Module Number   1687
 ImageMagick Version     ImageMagick 6.9.7-4 Q16 x86_64 20170114
 http://www.imagemagick.org
 GD Version      2.2.5
 Ghostscript Version     9.26
 Memory Limit    256M
 Max Execution Time      30
 Max Input Time  60
 Upload Max Filesize     20M
 Post Max Size   20MImagick Resource Limits
 Imagick area limit      122 MB
 Imagick disk limit      1073741824
 Imagick file limit      6144
 Imagick map limit       512 MB
 Imagick memory limit    256 MB
 Imagick thread limit    2
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39216#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list