Re: [GD-DEVEL] Newbie transparent gif question- possibly solved.

[email protected] ("Pierre Joye") Fri, 2 May 2008 14:29:03 +0200
Newsgroups php.gd.devel
Message-ID <[email protected]>
On Fri, May 2, 2008 at 2:25 PM, Roger Oberholtzer <[email protected]> wrote:

>  OK. But that is how it looks. If an image has the transparent color more
>  than once in the color map,

It does not use the color value but the color index. An index is
unique in the palette (from 0 to 255).

> and gdImageColorTransparent is called with
>  anything other than the first in the color map, you do not get a
>  transparent image. There may be more at play here, but it seems I can
>  manipulate this in a predictable manner. The change to my application
>  was minor, but I now seem to get transparent gifs as expected. I looked
>  a the transparency test program in the source: it is for true color
>  images. I did not see a transparency test program for colors as I am
>  using them. Maybe it is not a program on it's own. I am happy to explore
>  more as I would like to know that my code is correct and not hiding some
>  stupid bug on my part.

I will create a small example code later today, it may help.

Cheers,
-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org