1
Suppose I want to have two images side by side in a slide but they are different sizes. I know I can use "mogrify" and "convert" and all that to resize them, but it's a pain to type in the exact parameters.
Is there some tool or script (and matlab would be fine, for example) that: resizes images to make same aspect ratio, and maximally preserve image content?
E.g. let W x H be the naming convention. A is 400x300 and B is 403x299. So we then will make A => 400x299 and B => 400x299; same size and maximal area is preserved in both images.
1I saw javascript that did this with a two pass scale followed by a crop at one point. – RobotHumans – 2011-12-11T05:54:33.220
hm that could work, but do you know what exactly the code is, and is it even straightforward to run javascript from shell? I'm thinking some logic wrapping imagemagick would do it... depending how ambitious I am, I might write such a function perhaps ... it is extremely annoying to see mis-sized images on printed paper or projector. – peter karasev – 2011-12-11T09:30:25.797
Any chance of writing a bash script? – Camilo Martin – 2011-12-12T02:04:07.880