[wp-trac] [WordPress Trac] #23039: WP_Image_Editor_GD does not preserve alpha if is not resized

WordPress Trac noreply at wordpress.org
Fri Dec 21 21:02:29 UTC 2012


#23039: WP_Image_Editor_GD does not preserve alpha if is not resized
--------------------------+--------------------
 Reporter:  joehoyle      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5.1
Component:  Media         |     Version:  3.5
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by joehoyle):

 I did try and use `wp_imagecreatetruecolor `, however that creates an
 empty gd canvas, so we would need to get width / height of the original,
 then copy it over to the new `wp_imagecreatetruecolor` canvas. That works
 ok fo resize etc as it's being copied from resource to resource, however
 on load I thought it was maybe more complicated that just calling on it
 directly was simpler.

 I also wrote some basic unti tests for this, `test_image_preserves_alpha`
 passes after applying patch.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23039#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list