[solved] DDS-Files aspect ratio

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
Avanatus
Posts: 9
Joined: 2016-07-08T01:45:55-07:00
Authentication code: 1151

[solved] DDS-Files aspect ratio

Post by Avanatus »

Hi all,
i converted some dds files - all works fine - except - it seems for me the resize option preserves the aspect ratio of a converted file....

I want to stretch it more.

If i use the resize command it resizes it not to the values i use - it resizes it to preserve the aspect ratio of the base file....

Is there a switch that preserves the aspect ratio?
Last edited by Avanatus on 2016-07-08T13:19:28-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: DDS-Files aspect ratio

Post by fmw42 »

see http://www.imagemagick.org/script/comma ... p#geometry

If your input and specified output aspect are different, then -resize will preserve the input aspect and you will not get the desired output aspect. You can force it to the desired aspect using !, but then the image will be distorted to fit. You can make it correspond to the smaller dimension and have the larger dimension larger than desired using ^, but then crop to the desired aspect. Or you can leave off the flags and get it a little too small in the smaller dimension and will have to pad the output.
Avanatus
Posts: 9
Joined: 2016-07-08T01:45:55-07:00
Authentication code: 1151

Re: DDS-Files aspect ratio

Post by Avanatus »

Hello fmw42

thank you for your help :-)

Found in the meantime the option switch for resize ignore aspect ratio ! ...

I am using windows with batchfiles - so the correct statement for my batchfile is not 31x17! it is 31x17^^! ...

Sometimes reading the manual helps. :-)

Avanatus
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: [solved] DDS-Files aspect ratio

Post by fmw42 »

Yes, Windows syntax has different escapes and the batch files are different again.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: [solved] DDS-Files aspect ratio

Post by snibgo »

For Windows I prefer:

Code: Select all

-resize "31x17^!"
This always works in cmd or BAT, whether or not enabledelayedexpansion is in effect.
snibgo's IM pages: im.snibgo.com
Post Reply