Changing black to blue (2)
| From: | Andy | Date: | Sun, 31 Mar 2002 08:32:31 +0000 |
| Subject: | Changing black to blue (2) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90869@lists.php.net to get a copy of this message | ||
Hi there,
I know I already posted this prob 2 days ago, but I am still stuck. What I
tryed
is to use imagefill what BvR suggested, but the problem is, that I would
need to know where the black part is to set the start pixel color. This is
not
possible. Also Hugh was asking why I do not do this in Photos. Thats because
I have 250 images and don't want to save the same image twice. There must
be a way to do this in php.
The sittuation is as follows:
I have a map of the world with all countries. I have 250 maps of the same
size
as png where only one country is black, rest is transp.
Now I neeed to set this country color to blue or red to indicate a special
spot.
I just don't want to save the same map double or tripple.
How could I color the black spot inside the transparent png?
Thanx a lot for any hint.
Andy
PS: The old message is underneath
I would like to change the color on a png file from black to blue. This png
file is
transparent and contains only a spot which is black. It is needed to stay
transparent
because I am gonna merge it later on with a jpeg.
I tryed imagecolorset but anyhow I do not understand the syntax.
Here is my try:
# set home color
$farbe_b = imagecolorallocate($country_image,0,0,0); // create index for
the black color
imagecolorset($country_image,$farbe_b,51,51,204); // darker blue
Can anybody help on this.
Thanx in advance,
Andy