bobinindia Posted April 29, 2008 Share Posted April 29, 2008 I am trying to resize a png that was mage by gd. When i resize it some of the bacground transparency seems to be lost. <?php $src_img = imagecreatefrompng($im); $dst_img = imagecreatetruecolor($dest_x, $dest_y); $tpc = imagecolorallocate($dst_img, 255,255,255); imagecolortransparent($dst_img,$tpc); imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_x, $dest_y, $width, $height); $im is the png created by gd earlier. Link to comment https://forums.phpfreaks.com/topic/103383-transparent-png-not-so-transparent/ Share on other sites More sharing options...
haku Posted April 29, 2008 Share Posted April 29, 2008 Are you using IE6? IE6 doesn't render .png transparency properly and requires a javascript fix. Link to comment https://forums.phpfreaks.com/topic/103383-transparent-png-not-so-transparent/#findComment-529417 Share on other sites More sharing options...
bobinindia Posted April 29, 2008 Author Share Posted April 29, 2008 i'm using firefox but it needs to work in ie aswell. The original png works in ie6. Thanks for the tip but i think it's my code. Link to comment https://forums.phpfreaks.com/topic/103383-transparent-png-not-so-transparent/#findComment-529420 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.