Harley1979 Posted August 7, 2008 Share Posted August 7, 2008 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: 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; } 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 Link to comment https://forums.phpfreaks.com/topic/118687-image-cropping-script-need-help/ Share on other sites More sharing options...
Third_Degree Posted August 7, 2008 Share Posted August 7, 2008 well, you'll need the function imagejpeg regardless, but I know nothing about that script (I hate premade scripts, such a hassle to mod), so I wouldn't know how to integrate it into the code. Link to comment https://forums.phpfreaks.com/topic/118687-image-cropping-script-need-help/#findComment-611186 Share on other sites More sharing options...
Harley1979 Posted August 8, 2008 Author Share Posted August 8, 2008 Yeah I know what you mean about using premade scripts, not something I'm in the habbit of doing but i really need this functionality on a site I'm doing really badly. I'm not sure where my fall down is here, it may be that I don't know enough about creating images with php or just that I am hopeless with objects, properties and methods as that is what this script heavily uses. If anyone else has any ideas please let me know. Thanks Harley Link to comment https://forums.phpfreaks.com/topic/118687-image-cropping-script-need-help/#findComment-611436 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.