Home  |  Linux  | Mysql  | PHP  | XML
From:Roger Oberholtzer Date:Fri May  2 04:26:59 2008
Subject:Re: [GD-DEVEL] Newbie transparent gif question
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

Navigate in group php.gd.devel at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants