Montage: files with different dimension, but right proportions

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?".
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Montage: files with different dimension, but right proportions

Post by myspacee »

Ok, i manually resize height=1000 each image, run command without -resize=1000 and it works fine...

Code: Select all

convert 01.png 02.png 03.png 04.png -bordercolor white -border 12 ( -clone 0,1 +append ) -delete 0,1 ( -clone 0,1 +append ) -delete 0,1 -append -resize 1000 -quality 75 1234.png
I believe that I need to compute and test the aspect ratio (w/h) to see if it is landscape or portrait.
Then use -resize "widthx1000>" if landscape and -resize "widthx1000" if portrait.

Any workaround ? for example, is there any way to force resize only for height ?

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

Re: Montage: files with different dimension, but right proportions

Post by fmw42 »

... is there any way to force resize only for height ?
Yes, but that would distort your image.

Code: Select all

convert image -resize x1000! result
See ! at http://www.imagemagick.org/script/comma ... p#geometry
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: Montage: files with different dimension, but right proportions

Post by myspacee »

Solved using PHP,
I abandon 'right proportions' concept and force resize when crop in java/php.
Now IM script works fine.

thank you for all,
m.
Post Reply