Page 1 of 1

Resize image with "ignore aspect ratio" switch not working

Posted: 2013-07-22T10:54:42-07:00
by MrGadget
I have what is likely an easy question for experienced users of ImageMagick. I did search the boards and did not find a thread that answered this for me. I am using version 6.8.6-6

I am trying to force an image to 160X160 no matter what the original size is - all other attributes can stay the same.

The command I used is: convert folder.jpg -resize 160X160\! folder2.jpg I also tried it on a *.gif file and in either case the file size did not change. If I leave off the " ! " switch, the file size changes, but aspect ratio remains the same as the original image. Can anyone tell me what I am doing incorrectly?

TIA

Re: Resize image with "ignore aspect ratio" switch not worki

Posted: 2013-07-22T11:06:36-07:00
by GreenKoopa
What platform? Have you tried omitting the backslash before the exclamation?

Re: Resize image with "ignore aspect ratio" switch not worki

Posted: 2013-07-22T11:14:21-07:00
by MrGadget
Windows 8 Pro. I tried it without the backslash and it worked for me that time. I guess I was being to literal in following the syntax as I read it; I tried spaces before and after everything, but never thought to just drop the " \ ".

Thanks a bunch, GreenKoopa - now I can get back to actually working and leave what's left of my hair untouched!

~by

Re: Resize image with "ignore aspect ratio" switch not worki

Posted: 2013-07-22T11:15:51-07:00
by fmw42
us a lower case x not cap X

if on unix/mac, try

convert folder.jpg -resize 160x160\! folder2.jpg

or

convert folder.jpg -resize 160x160! folder2.jpg

or

convert folder.jpg -resize "160x160!" folder2.jpg

Re: Resize image with "ignore aspect ratio" switch not worki

Posted: 2013-07-22T11:20:24-07:00
by GreenKoopa
Most examples need to be adapted for Windows.
http://www.imagemagick.org/Usage/windows/#conversion