A simple image using a single color (red) : imagecolorallocate « Graphics Image « PHP






A simple image using a single color (red)

 
<?php
    $img = imagecreate(200, 200);
    imagecolorallocate($img, 0xFF,0,0);

    header("Content-type: image/png");
    imagepng($img);
?>
  
  








Related examples in the same category

1.Allocate image color
2.Creating and Using Colors