note 84479 added to function.imagesetpixel
| From: | Anonymous at osu1 dot php dot net | Date: | Wed, 16 Jul 2008 04:41:22 +0000 |
| Subject: | note 84479 added to function.imagesetpixel | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-141558@lists.php.net to get a copy of this message | ||
This snippet creates a gradient images depending on the value of RGB components. Gradients allow
your page to have a shadow effect.
<?php
try{
if(!$image=imagecreatetruecolor(50,10)){
throw new Exception('Error creating image');
}
for($y=0;$y<10;++$y)
{
$color=imagecolorallocate($image, 75+($y*5),75+($y*11),75+($y*9));
for($x=0;$x<50;++$x)
{
imagesetpixel($image,$x,$y,$color);
}
}
//header("Content-type: image/jpeg");
imagejpeg($image,'footerShadow.jpg');
// free memory
imagedestroy($image);
}
catch(Exception $e){
echo $e->getMessage();
exit();
}
?>
----
Server IP: 208.69.120.35
Probable Submitter: 167.1.146.100
----
Manual Page -- http://www.php.net/manual/en/function.imagesetpixel.php
Edit -- https://master.php.net/note/edit/84479
Del: integrated -- https://master.php.net/note/delete/84479/integrated
Del: useless -- https://master.php.net/note/delete/84479/useless
Del: bad code -- https://master.php.net/note/delete/84479/bad+code
Del: spam -- https://master.php.net/note/delete/84479/spam
Del: non-english -- https://master.php.net/note/delete/84479/non-english
Del: in docs -- https://master.php.net/note/delete/84479/in+docs
Del: other reasons-- https://master.php.net/note/delete/84479
Reject -- https://master.php.net/note/reject/84479
Search -- https://master.php.net/manage/user-notes.php