note 40957 deleted from function.imagefill by nlopess
| From: | nlopess@php.net | Date: | Sat, 18 Feb 2006 20:12:06 +0000 |
| Subject: | note 40957 deleted from function.imagefill by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-103988@lists.php.net to get a copy of this message | ||
Note Submitter: rev at return to the pit dot com
----
since it's not spoke of what int color is...
here's what I finally figured out:
it's a reference to a loaded color.
/start code:
$im = ImageCreateFromJPEG("us_map_regions.jpg");
$red = 225;
$green = 0;
$blue = 255;
$color = ImageColorAllocate( $im, $red, $green, $blue );
$x = 100;
$y = 100;
imagefill($im, $x,$y, $color);
header("Content-type: image/jpeg");
Imagejpeg($im,"",100);
ImageDestroy($im);
/end code
and "bang" there you go.. a nicely lavender filled area.
enjoy.