Hi,
I found ImageMagick very helpful on manipulating with images. However, I'm trying to accomplish the following result for days now and it seams that I'm still not understanding what is going on!
What I want to achieve is:
Get an image (gif, jpg or png) of a give dimension, ex.: 377x250px, zoom it to 427x238px, than move X & Y pixels from left and top, and then crop it to exactly 180x180px without stretching it.
Here is the illustration of it
Any help from your will really be appreciated.
Thanks,
Bajram
Zoom, offset, crop
Re: Zoom, offset, crop
Have you checked out the -crop instructions: http://www.imagemagick.org/script/comma ... s.php#crop
You set the size you want first and then set the offset.
You set the size you want first and then set the offset.
Re: Zoom, offset, crop
Hi,
I found the solution, here it is:
Resize the image to the new size, crop it with specified x/y offset and then rebuild it completely as an image
Thanks
I found the solution, here it is:
Resize the image to the new size, crop it with specified x/y offset and then rebuild it completely as an image
Code: Select all
/usr/local/bin/convert from.gif -resize 427x238 -crop 180x180+124+67 +repage to.gif