Crop image with 4 coordinates and a specific target size
Posted: 2017-06-29T09:30:45-07:00
I have this image: https://imagga.com/static/images/taggin ... 76_640.jpg which I want to crop a size of 500x300. The width and height is the target size after the crop has been applied.
The coordinates I want to crop the image with size 100x100 by is 0,0 (top,left) and 639, 384 (bottom,right). When the crop is done I expect the image to be 500x300 cropped with the coordinates above. I have tried two different commands with no success.
This is the first command I have tried:
This is what the result looks like:
The other command I have tried looks like this:
This is what the result looks like from the command above:
How should the command be written to produce the correct result?
This is how the correct cropping should look
The coordinates I want to crop the image with size 100x100 by is 0,0 (top,left) and 639, 384 (bottom,right). When the crop is done I expect the image to be 500x300 cropped with the coordinates above. I have tried two different commands with no success.
This is the first command I have tried:
Code: Select all
convert http://imagga.com/static/images/tagging/wind-farm-538576_640.jpg -crop 500x300+0,0+639,384 +repage out.jpg
The other command I have tried looks like this:
Code: Select all
convert http://imagga.com/static/images/tagging/wind-farm-538576_640.jpg -crop 0x0+0,0+639,384 +repage -resize 500x300 out.jpg
How should the command be written to produce the correct result?
This is how the correct cropping should look