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

[email protected] (Roger Oberholtzer) Fri, 02 May 2008 13:28:31 +0200
Newsgroups php.gd.devel
Message-ID <[email protected]>
On Fri, 2008-05-02 at 12:26 +0200, Roger Oberholtzer wrote:
> Hello
> 
> I know, bad form to follow one's own post. I have more info, but no
> solution.

And here I go again.

I think that I wind up with the color I want to be transparent being
defined more than once in the color map. Due to the way my code is
written, it could wind up setting the transparent color to a later
duplicate instance of the desired transparent color. Then it is no
longer going to be transparent. If I ensure that the transparent color
is defined as the first one, AND that I only set the transparent color
to this index (0), then all is ok. I think that my code wound up setting
the transparent color to the correct color, but the color was a
duplicate at some place other than 0 in the color map.

IMHO, the function gdImageColorTransparent is not fully correct, at
least when making a GIF. The second argument seems to need to be 0.
Anything else results in loff of transparency.

-- 
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