If you are reducing only and do not care about going over on one side 
or the other then use -resize 'WIDTHxHEIGHT>^`

That will reduce only if the image is larger than WIDTHxHEIGHT and 
will resize according to the images smaller dimension to fit WIDTH or 
HEIGHT. The other dimension will be larger than what you specified by 
WIDTH or HEIGHT.

In your case, your image has an aspect ratio of 
1900/1200=1.58333333333 and WIDTH/HEIGHT=1024/768=1.333333333. So 
your image has a larger w to h aspect ratio than you specify in 
-resize. Thus the smaller dimension will be the height and your image 
will end up with a height of 768. Then the width will be scaled to 
768*1.583=1216. Thus you will have an image result of 1216x768


>So the question is ... how should I calculate it? Say I have a 1024x768
>screen and my image is larger (a rectangle of say 1900x1200). I want to
>avoid letterboxing at all costs. So basically: the new image HAS to fit the
>minimum dimensions but can go over in height or width, doesn't matter which.
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to