Page 1 of 1

LR/Mogrify2 - Crop/change aspect ratio

Posted: 2012-01-27T18:36:13-07:00
by Stilesy
I've been using LR Mogrify for some time to automatically resize images on export. I usually supply clients with a 35mm aspect high res photo and the same in a 4:3 ratio web res file. The only way I have of changing the aspect ratio from 35mm to 4:3 is to add a white border top and bottom, however some clients don't like this. Using the 'Fit Inside (pixel dimensions supplied)' command squashes/distorts the image.

Is there a way to automatically resize + crop/trim the edges of these files on export from Lightroom 3 using Imagemagick?

Any help would be appreciated...


Stilesy

Re: LR/Mogrify2 - Crop/change aspect ratio

Posted: 2012-01-27T18:59:39-07:00
by fmw42
Correct me if I am wrong, but I thought that 35mm corresponded to an aspect ratio of 4:3 or 1.33:1 (except for academy format of 35mm which is 1.37:1)

There is no aspect ratio resizing that I know about in IM. But you can resize to the smaller dimension so that the larger dimension is too big and then crop. See the ^ part of -resize at http://www.imagemagick.org/script/comma ... p#geometry as well as http://www.imagemagick.org/Usage/resize/#fill Note there should be no distortion when using this.

You will have to do some computations yourself to convert the aspect ratio to desired width and height for resize.

(Or you can use ! to force the resize to the specific dimensions, though it will distort your image.)

I do not believe that the Imagemagick developers have/had anything to do with LR, so for integration of LR with IM you probably need to ask the LR developers.

I will defer to the IM developers if I am wrong about any of this.

If you are on Linux/Mac, you can try my bash shell script, aspect, at the link below. It has the option to resize and crop. (And also see aspectpad, though you need the opposite action of crop rather than pad). Perhaps the former will be useful or at least they both will give you some idea about the computations.

Re: LR/Mogrify2 - Crop/change aspect ratio

Posted: 2012-01-27T20:27:53-07:00
by anthony
As Fred pointed out 35mm is a focus length, it is not an aspect ratio.

However you can use the 'Fill and Crop' to fit a image into a 4:3 box so that you trim the edges that does not fit.
No calculations are needed for the crop. Just the 'box size' you used for the resize.

See Cut the Thumbnail to Fit
http://www.imagemagick.org/Usage/thumbnails/#cut