convert + crop create 2 images!?!

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England
Contact:

Re: convert + crop create 2 images!?!

Post 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');
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests