[wp-trac] [WordPress Trac] #48202: Media: rotation of JPEG files may fail

WordPress Trac noreply at wordpress.org
Thu Oct 3 16:46:38 UTC 2019


#48202: Media: rotation of JPEG files may fail
--------------------------+---------------------
 Reporter:  azaozz        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  5.3
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by azaozz):

 Looking at #30596 (where this code was added) and at
 https://www.php.net/manual/en/function.imagealphablending.php it seems
 that `imagealphablending( $rotated, true );` was added in error. When
 true, `imagealphablending()` removes transparency and "blends" the pixels
 making them opaque.

 It is also set to false when loading the image, seemingly for the same
 reason.

 The only bit that's needed is `imagesavealpha( $rotated, true );` which is
 used only for PNGs.

 Patch coming up.

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


More information about the wp-trac mailing list