[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 Sep 16 11:31:08 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 madejackson):
Replying to [comment:11 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.
Can confirm, This worked for me, too.
The two other Solutions proposed in ticket #45982 did break the thumbnail-
generation for me.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39216#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list