imagecreatefromgif & imagecolortransparent() ??
Posted: Tue Dec 02, 2008 12:59 pm
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hi all, the simple snippet
is creating the new image but is not setting the white background to transparent; a similarly simple test based on imagecreatetruecolor() works correctly... any hints?!
Ciao, Luca
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hi all, the simple snippet
Code: Select all
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);
Ciao, Luca
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: