note 80830 added to function.imagecopy

From: Date: Sat, 02 Feb 2008 13:22:00 +0000
Subject: note 80830 added to function.imagecopy
Groups: php.notes 
Request: Send a blank email to php-notes+get-135730@lists.php.net to get a copy of this message
I had the same problem as Jeff, but his solution didn't work for me. I made this script, and it seems to work: <?php $img = imagecreatefromgif('in.gif'); $w = imagesx($img); $h = imagesy($img); $trans = imagecolortransparent($img); if($trans!==FALSE) { $rgb = imagecolorsforindex($img, $trans); $oldimg = $img; $img = imagecreatetruecolor($w,$h); $color = imagecolorallocate($img,$rgb['red'],$rgb['green'],$rgb['blue']); imagefilledrectangle($img,0,0,$w,$h,$color); imagecopy($img,$oldimg,0,0,0,0,$w,$h); } imagegif($img,'out.gif'); ?> ---- Server IP: 213.249.64.162 Probable Submitter: 81.241.186.205 ---- Manual Page -- http://www.php.net/manual/en/function.imagecopy.php Edit -- https://master.php.net/note/edit/80830 Del: integrated -- https://master.php.net/note/delete/80830/integrated Del: useless -- https://master.php.net/note/delete/80830/useless Del: bad code -- https://master.php.net/note/delete/80830/bad+code Del: spam -- https://master.php.net/note/delete/80830/spam Del: non-english -- https://master.php.net/note/delete/80830/non-english Del: in docs -- https://master.php.net/note/delete/80830/in+docs Del: other reasons-- https://master.php.net/note/delete/80830 Reject -- https://master.php.net/note/reject/80830 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135730) next »