[wp-trac] [WordPress Trac] #13461: Preserve GIF transparency/alpha during thumbnail creation

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 11 02:03:36 UTC 2012


#13461: Preserve GIF transparency/alpha during thumbnail creation
-----------------------------------------------+--------------------
 Reporter:  javitxu123                         |       Owner:
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  3.5
Component:  Media                              |     Version:  2.9.2
 Severity:  normal                             |  Resolution:
 Keywords:  has-patch needs-testing 3.5-early  |
-----------------------------------------------+--------------------

Comment (by n3k4):

 I've used this before to preserve transparencies for .png and .gif;

 {{{
  if($type == "gif" or $type == "png"){
     imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0,
 127));
     imagealphablending($new, false);
     imagesavealpha($new, true);
   }
 }}}

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


More information about the wp-trac mailing list