Re: [GD-DEVEL] Newbie transparent gif question

From: Date: Fri, 02 May 2008 10:26:59 +0000
Subject: Re: [GD-DEVEL] Newbie transparent gif question
References: 1 2 3  Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-420@lists.php.net to get a copy of this message
Hello I know, bad form to follow one's own post. I have more info, but no solution. In looking at the GD code, if GD thinks there is a transparent color, then the gif is tagged GIF9a. My gifs are tagged so. The 'transparent' member of the GD image descriptor is set to the index of the transparent color. In my case, it is set to the first color (grey) as expected. If I list the color map with giftrans, I get: Global Color Table: Color 0: Red 200, Green 200, Blue 200, #c8c8c8 Color 1: Red 0, Green 0, Blue 0, #000000 Color 2: Red 200, Green 200, Blue 200, #c8c8c8 Color 3: Red 255, Green 255, Blue 0, #ffff00 Color 4: Red 0, Green 0, Blue 0, #000000 Color 5: Red 255, Green 165, Blue 0, #ffa500 Color 6: Red 0, Green 0, Blue 0, #000000 Color 7: Red 255, Green 0, Blue 0, #ff0000 If I then tell giftrans to use color #c8c8c8 as the transparent color, I get a transparent gif as expected, and the color table is listed unchanged. So, it seems to me that GD has all needed info from my program. But it is not making the image transparent. I wonder if the duplicate entries for #c8c8c8 are the problem. I'm not sure why they are there, but giftrans has no problem with them. I will explore this. -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Kapellgränd 7 P.O. Box 4205 SE-102 65 Stockholm, Sweden Office: Int +46 8-615 60 20 Mobile: Int +46 70-815 1696

« previous php.gd.devel (#420) next »