Working with JPGs : imagejpeg « Graphics Image « PHP






Working with JPGs

 
<?php
    $animage = imagecreate (200, 200);
    $red = imagecolorallocate ($animage, 255, 0, 0);
    imagerectangle ($animage, 0, 0, 200, 200, $red);
    imagejpeg ($animage);
    header ("Content-type: image/jpeg");
    imagedestroy ($animage);
?>
  
  








Related examples in the same category

1.Basic image script
2.Loading an Existing Image