Image cropping script - need help
Posted: Thu Aug 07, 2008 4:24 pm
Hello,
I am using a nice little script I came across to crop images (here are the files: http://php.amnuts.com/index.php?do=view&id=12 - Demo: http://php.amnuts.com/demos/crop-canvas/interactive.php)
I now have it working ok, on the final stage it is writing the image out to the screen in the code here:
My question is how do I make this image a jpg file and save to a directory? I've only done simple file upload scripts before now and don't have much of an idea how this is gonna work.
Any help is much appreciated.
Thanks
Harley
I am using a nice little script I came across to crop images (here are the files: http://php.amnuts.com/index.php?do=view&id=12 - Demo: http://php.amnuts.com/demos/crop-canvas/interactive.php)
I now have it working ok, on the final stage it is writing the image out to the screen in the code here:
Code: Select all
require('class.cropinterface.php');
$ci =& new CropInterface(true);
if (isset($_GET['file'])) {
$ci->loadImage($_GET['file']);
$ci->cropToDimensions($_GET['sx'], $_GET['sy'], $_GET['ex'], $_GET['ey']);
$ci->showImage('png', 100);
exit;
}Any help is much appreciated.
Thanks
Harley