From: Konrad Foerstner <[EMAIL PROTECTED]>

> I cansee here no advandtage. But I left out some
> details: I need to handle with capital and small letters
> and the different letters will get differenz colors (no in groups). I
> haven't tried your solution, because I can't find the solution for the
> my problem...perhaps you could explane it to me?
> 
> Konrad

(Hope those that know more about graphics will correct me if I make a 
mistake here.)

GIF files (not sure about PNG) use a so called "palette". You can 
only use 256 different colors in the image, but which 256 will that 
be is up to you, you can select them out of 1048576 (256*256*256).

The $img->colorAllocate(0,0,255), adds a new color to the palette, 
even though you already have a color that's exactly the same there.
So after you fill the palette completely no more colorAllocate() will 
work correctly ... which in this case means they will return the last 
color you added successfully.

Hope this makes things a little clearer.

Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
                                        --- me


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to