Monday, 15 September 2014

php - Cropping an image using Jcrop and Imagemagick -


How do I understand that the image works in magazines.

I have the following values ​​from jacrap.

  (x1, y1), (x2, y2), width and height  

and the following command:

  Exec ("$ target_path -crop" Convert $ W. "X". $ H. "+ $ X + $ Y + $ target_path repage");  

Original image:

Enter image details here

Result after Crop:

My question is, how do I use coordinates and dimensions from jacrap, and experiment with imaging?

I do not know which values ​​you have passed in convert But your order has to look at something like this to remove the light area-if your goal:

  convert x.png -crop 240x240 + 120 + 100 out.png  

Enter image details here

first 240 < / Code> crop is the width of the field, and the second is 240 its height. 120 is an X-offset from the top-left corner and +100 is y-offset from the top.

Or in general terms, you specify this type of crop

  change input - crop $ {x} x $ {y} + $ {a} + $ {B} output.png  

enter image details here


No comments:

Post a Comment