note 19576 added to function.imagecolorallocate
| From: | simon at paarlberg dot dk | Date: | Mon, 04 Mar 2002 16:08:58 +0000 |
| Subject: | note 19576 added to function.imagecolorallocate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27320@lists.php.net to get a copy of this message | ||
I made a function to write the colorcodes i HEX
function mkcolor($image,$color){
$color = eregi_replace("#","",$color);
$red = hexdec(substr($color,0,2));
$green = hexdec(substr($color,2,2));
$blue = hexdec(substr($color,4,2));
$out = ImageColorAllocate($image, $red, $green, $blue);
return($out);
}
--
http://www.php.net/manual/en/function.imagecolorallocate.php
http://master.php.net/manage/user-notes.php?action=edit+19576
http://master.php.net/manage/user-notes.php?action=delete+19576
http://master.php.net/manage/user-notes.php?action=reject+19576