[wp-trac] [WordPress Trac] #39216: PDFs with non-opaque alpha channels can result in previews with black backgrounds.

WordPress Trac noreply at wordpress.org
Wed Aug 7 15:38:15 UTC 2019


#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 maysi):

 Replying to [comment:9 mwtsn]:

 > In the file `wp-includes/class-wp-image-editor-imagick.php` after line
 153 (`$this->image->readImage( $filename );`) you can put in the code:
 >
 > {{{
 > $this->image->setImageBackgroundColor('white');
 > $this->image = $this->image->flattenImages();
 > }}}

 This worked for me, too.

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


More information about the wp-trac mailing list