<?
include_once("class.imgresize.php"); // include our class
/*
imgresize() class example.
Resize image named 'moose.jpg'. Percent: 70%
*/
// set our header to image/jpeg for output
header("Content-Type: image/jpeg");
// create our class
$img = new imgresize();
// load our image
$img->loadimage("moose.jpg");
// resize our image by 70 percent
$img->resizebypercent(70);
// saves our resized image as 'thumb_moose.jpg'. if the file exists, we'll overwrite.
//$img->saveto("thumb_moose.jpg",true);
// dump our resized image to the browser
$img->output();
?>
|