imagecreatefromgif & imagecolortransparent() ??

From: Date: Thu, 04 Dec 2008 10:44:12 +0000
Subject: imagecreatefromgif & imagecolortransparent() ??
Groups: php.general 
Request: Send a blank email to php-general+get-284088@lists.php.net to get a copy of this message
Hi all, the simple code snippet: header('Content-type: image/gif'); $im = imagecreatefromgif("/path/Mypic.gif"); $background = imagecolorallocate($im, 255, 255, 255); imagecolortransparent($im,$background); imagegif($im,'/path/TransparentPic.gif'); imagedestroy($im); is creating the new image but is not setting the white background to transparent; I am sure about the presence of the white color in the background (checked it with imagecolorat() etc). a similarly simple test setting transparency on a new image created with 'imagecreatetruecolor()' works correctly... any hints?! Cheers, Luca

« previous php.general (#284088) next »