[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 Jul 19 22:34:02 UTC 2023


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

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56271" 56271]:
 {{{
 #!CommitTicketReference repository="" revision="56271"
 Media: Adjust PDF upload handling to remove non-opaque alpha channels from
 previews.

 Previously, Imagick uploads of PDF files with non-opaque alpha channels
 would result in a black background replacing alpha in the generated
 thumbnail. This patch adds a `remove_pdf_alpha_channel()` function in the
 Imagick classes to use a white background instead.

 Props gitlost, joemcgill, joedolson, launchinteractive, emirpprime, mwtsn,
 ceer, maysi, madejackson, 6adminit, costdev, oglekler.
 Fixes #39216.
 }}}

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


More information about the wp-trac mailing list