Zipp425 Posted April 18, 2007 Share Posted April 18, 2007 Im trying to make a PHP backend for this tool Using Ajax, I pass resize2.php?resize=true&src=http://localhost/imageEditor/me.jpg&w=400&h=200&s=1&x=0&y=100 Heres what I currently have in the php file, but it says that Im not using a valid image resource if($_GET['resize'] = true){ $filedir = '../images/'; // the directory for the original image $prefix = date('mdy_His_'); // the prefix to be added to the original name $maxfile = '2000000'; $uploadDir = $filedir.$prefix.'upload.jpg'; $srcImg = imagecreatefromjpeg($_GET['src']); imagecopyresampled($uploadDir,imagecreatefromjpeg($_GET['src']),0,0,$_GET['x'],$_GET['y'],$_GET['w'],$_GET['h'],400,400); } Any help on this subject would be great. also, let me know if you have any questions. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.