note 96988 added to function.imagecreate
| From: | JamesM at osu1 dot php dot net | Date: | Fri, 26 Mar 2010 08:03:11 +0000 |
| Subject: | note 96988 added to function.imagecreate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-167427@lists.php.net to get a copy of this message | ||
doesnt ruin the image but adds display to the output.
this will generate an image with a random color. if you like it you can use it because you have the
RBG result too.
<?php
header("content-type:image/png");
$im = imagecreate(100, 100);
$a = sprintf('%04x',mt_rand(0, 65535));
$b = sprintf('%04x',mt_rand(0, 65535));
$c = sprintf('%04x',mt_rand(0, 65535));
$white = imagecolorallocate($im,$a,$b,$c);
imagepng($im);
imagedestroy($im);
echo "\n\n\n$a-$b-$c";
?>
----
Server IP: 69.147.83.197
Probable Submitter: 218.214.20.47
----
Manual Page -- http://www.php.net/manual/en/function.imagecreate.php
Edit -- https://master.php.net/note/edit/96988
Del: integrated -- https://master.php.net/note/delete/96988/integrated
Del: useless -- https://master.php.net/note/delete/96988/useless
Del: bad code -- https://master.php.net/note/delete/96988/bad+code
Del: spam -- https://master.php.net/note/delete/96988/spam
Del: non-english -- https://master.php.net/note/delete/96988/non-english
Del: in docs -- https://master.php.net/note/delete/96988/in+docs
Del: other reasons-- https://master.php.net/note/delete/96988
Reject -- https://master.php.net/note/reject/96988
Search -- https://master.php.net/manage/user-notes.php