Page 2 of 2

Re: Image crop

Posted: 2011-01-26T12:07:10-07:00
by Bonzo
Not quite sure what you want to do as the javascript programs just work on one crop per image.
I have used Javascript Image Cropper UI and either it already uses Imagemagick or I modified it but can not remember and no longer have the code.

Re: Image crop

Posted: 2011-01-26T14:42:47-07:00
by userman
Hi bonzo,

I want 5 crop per image.

you can check it in http://fbphotomagic.com/uploadphoto uploading a image....

Re: Image crop

Posted: 2011-01-27T11:03:50-07:00
by Bonzo
The code I posted actualy produces the cropped images:

Code: Select all

$cmd = "$original_image -gravity northwest".
" \( +clone -crop 100x200+20+125 -write 1.jpg +delete \) ".
" \( +clone -crop 100x40+140+205 -write 2.jpg +delete \) ".
" \( +clone -crop 100x40+250+205 -write 3.jpg +delete \) ".
" \( +clone -crop 100x40+360+205 -write 4.jpg +delete \) ".
" -crop 100x40+470+220 5.jpg ";
If you wanted you could replace the positions in the above code with variables. You would need to calculate the variables from the positions passed from the javascript code.