Page 1 of 1

Re: convert + crop create 2 images!?!

Posted: 2008-09-10T07:51:57-07:00
by Bonzo
You want to post this sort of request in the users part of the forum.

I would try:

Code: Select all

exec('convert ../image001_original.jpg -crop {$_REQUEST['width']}x{$_REQUEST['height']}+{$_REQUEST['x']}+{$_REQUEST['y']} -quality 85 ../image001.jpg');
If I was writting this I would put the $_REQUEST[] into a variable as its easer to read:

Code: Select all

$width = $_REQUEST['width'];
$height = $_REQUEST['height'];
$x = $_REQUEST['x'];
$y = $_REQUEST['y'];
exec('convert ../image001_original.jpg -crop {$width}x{$height}+$x+$y -quality 85 ../image001.jpg');