Color: red, green and blue : Image Color « Graphics Image « PHP






Color: red, green and blue


<?php
     header("Content-type: image/gif");
     $imgcord = imagecreate(250,300);
     $red = imagecolorallocate($imgcord, 255,0,0);     
     $green = imagecolorallocate($imgcord, 0,255,0);     
     $blue = imagecolorallocate($imgcord, 0,0,255);     

     imageline($imgcord, 5,5, 125,50, $red);
     imagearc($imgcord, 100,25, 120,125, 0, 180, $green);
     ImagePNG($imgcord);
     ImageDestroy($imgcord);
?>
           
       








Related examples in the same category

1.Create Color for paint
2.Writing a String with imageTTFtext()