PHP/Graphics Image/imagejpeg
Basic image script
<source lang="html4strict">
<?php
$image = imagecreate(400,300); // do stuff to the image imagejpeg($image, "", 75); imagedestroy($image);
?>
</source>
Loading an Existing Image
<source lang="html4strict">
<?
$animage = imagecreatefromjpeg ("images/tiger.jpg")){ imagejpeg ($animage); header ("Content-type: image/jpeg"); imagedestroy ($animage);
?>
</source>
Working with JPGs
<source lang="html4strict">
<?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);
?>
</source>