| 
<?php
//include the class
 define("IMAGE_MAX_SIZE",1000000);
 define("IMAGE_UPLOAD_PATH",rtrim($_SERVER['DOCUMENT_ROOT']),"/")."/images/");
 
 include("path/classFileName");
 
 $maxwidth = 180;
 $maxHeight = 160;
 
 // THIS IS AN EXAMPLE USING AN IMAGE ALREADY ON THE SERVER
 // load the class
 $img = new images();
 // open a file
 $img->openImage("/disk/images/imageName.jpg");
 // make the image fit in a 180x160 space
 $img->transformToFit($maxwidth,$maxHeight);
 // add a red stroke of 2 pixels to the image
 $img->strokeImage(2,"FF0000");
 // save the image
 $img->saveImage("/disk/images/treatedImages/newName.jpg");
 ?>
 
 |