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.