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
Resize image with "ignore aspect ratio" switch not working
- GreenKoopa
- Posts: 457
- Joined: 2010-11-04T17:24:08-07:00
- Authentication code: 8675308
Re: Resize image with "ignore aspect ratio" switch not worki
What platform? Have you tried omitting the backslash before the exclamation?
Re: Resize image with "ignore aspect ratio" switch not worki
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
Thanks a bunch, GreenKoopa - now I can get back to actually working and leave what's left of my hair untouched!
~by
- 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
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
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.
- GreenKoopa
- Posts: 457
- Joined: 2010-11-04T17:24:08-07:00
- Authentication code: 8675308
Re: Resize image with "ignore aspect ratio" switch not worki
Most examples need to be adapted for Windows.
http://www.imagemagick.org/Usage/windows/#conversion
http://www.imagemagick.org/Usage/windows/#conversion