<?php
/*
HOW TO USE THIS CLASS:
//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 FROM POST
// load the class
$img = new images();
// open a file
$img->getImageFromPost("NAME_OF_FORM_ELEMENT");
// 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");
*/
?>
|