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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.