Re: changing the color from black to blue on an image. Help on imagecolorset.

From: Date: Sat, 30 Mar 2002 10:04:59 +0000
Subject: Re: changing the color from black to blue on an image. Help on imagecolorset.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90759@lists.php.net to get a copy of this message
first: <http://www.php.net/manual/en/function.imagefill.php> $col = imagecolorallocate($im, 51, 51, 204); then: ImageFill <http://www.php.net/manual/en/function.imagefill.php>($im, $x, $y, $col); or ImageSetPixel($im, $x, $y, $col); bvr. Andy wrote:
Hi there, 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


« previous php.general (#90759) next »