update page now

Voting

: one plus eight?
(Example: nine)

The Note You're Voting On

Anonymous
17 years ago
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();
}
?>

<< Back to user notes page

To Top