Resize image with "ignore aspect ratio" switch not working

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
MrGadget
Posts: 2
Joined: 2013-07-22T10:41:35-07:00
Authentication code: 6789

Resize image with "ignore aspect ratio" switch not working

Post 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
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

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

Post by GreenKoopa »

What platform? Have you tried omitting the backslash before the exclamation?
MrGadget
Posts: 2
Joined: 2013-07-22T10:41:35-07:00
Authentication code: 6789

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

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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
Last edited by fmw42 on 2013-07-22T11:56:08-07:00, edited 1 time in total.
User avatar
GreenKoopa
Posts: 457
Joined: 2010-11-04T17:24:08-07:00
Authentication code: 8675308

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

Post by GreenKoopa »

Most examples need to be adapted for Windows.
http://www.imagemagick.org/Usage/windows/#conversion
Post Reply