imagecreatefromgif & imagecolortransparent() ??
- From: lucapost@xxxxxxxxx (LucaP)
- Date: Thu, 4 Dec 2008 11:44:12 +0100
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
.
- Follow-Ups:
- Re: [PHP] imagecreatefromgif & imagecolortransparent() ??
- From: "Ólafur Waage"
- Re: [PHP] imagecreatefromgif & imagecolortransparent() ??
- Prev by Date: Re: [PHP] Does php 5.2.5 support imap4rev1 search criterias
- Next by Date: Re: preg_match_all() help
- Previous by thread: IE8 and HTML5
- Next by thread: Re: [PHP] imagecreatefromgif & imagecolortransparent() ??
- Index(es):
Relevant Pages
|