Cropping multiple images

Moderator: jsachs

Post Reply
Marpel
Posts: 692
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Cropping multiple images

Post by Marpel »

I have a number of images that I am wishing to crop to the same dimensions.

Although they start out as the exact same size, because they require leveling first, they change those dimensions, albeit slightly. Each image requires a bit different leveling, so each has a different outcome.

I tried cropping the first image to the required final size, constraining it to the 2 x 3 format, then using "Reload last settings" on subsequent images.

The first image I tried this on had different final dimensions (out by up to 35 pixels in one dimension). And of course, reload last settings becomes useless on subsequent images.

I assume, because the images were different sizes to start, reload last settings does not work for this circumstance.

So, how can I crop a large group of different sized images to the same format and dimensions (all images are larger than the resultant crop size) in an expedient manner? For the first image, I had to zoom in considerably to get the crop area to an exact dimension. I don't wish to do that multiple times, if I can avoid it.

Marv
jsachs
Posts: 4203
Joined: January 22nd, 2009, 11:03 pm

Re: Cropping multiple images

Post by jsachs »

The easiest way to do this is to use the Layout transformation. Once you set it up it takes care of everything.

1) bring up Layout and change the units to pixels, and then enter the desired image width and height.

2) click the + button to insert a new panel and drag its corners or sides to resize it to fill the entire output image. Check that the panel size is correct.

3) select Fit Panel - scale 1:1 as the scaling option.

Save these settings using the Settings menu under a name you can remember for future use or if you need to start over later.

To use it, select the image you want to crop as the Color/Image and then click the side by side button at the top of the dialog box to display the input image in the main image area. You can drag the cropping rectangle overlay as necessary to decide what part of the image you want to keep. Then click OK and Layout will crop the image to the desired size.

Repeat the previous step for the other images you want to crop.

I did find a problem with Layout cropping rectangle while testing this, but if you stick to the above procedure you should be OK.
layout v1.jpg
layout v1.jpg (95.98 KiB) Viewed 1384 times
Jonathan Sachs
Digital Light & Color
tomczak
Posts: 1367
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Cropping multiple images

Post by tomczak »

Two (three now) additional ideas (if I understood what's required) that perhaps could be useful:

1) Use 'Crop to Original Size' button in Level, which leaves the pixel dimension of the image intact, at the expense of introducing black solid color in the corners where there is no image anymore after rotating. If the Levelling is not too extreme and the crop substantial, those corners should fall outside of the cropped area.

2) Use the default Level cropping method, but sandwich Resize to original pixel dimension between Level and Crop.

3) And yet another possibility - It seems to be working in batch mode - the description is longer than what it actually takes; get rid of Level and Crop altogether and replace two of them with a single Warp. Set Warp to Rigid, and move and rotate the Warp rectangle to level and crop the first image (I don't know how to change cropping rectangle proportions to be different than the original image without actually warping it, though). Then, when you're happy with the size of your crop, set Scale Factor to 1:1, change Warp settings to Rotate Only and then click OK. Set Breakpoint on Warp and run the batch rotating the rectangle to level each image in turn - the cropping rectangle size and its centre should stay the same.
Maciej Tomczak
Phototramp.com
Winfried
Posts: 239
Joined: June 18th, 2010, 4:27 pm
What is the make/model of your primary camera?: Pentax K1

Re: Cropping multiple images

Post by Winfried »

I normally do this with a short 3-step script:
1. Crop the image to the required ratio, for example 16:9 for tv-images
2. Resize to the required pixelsize, for example 1920x1080
3. Export the image to disk

If you define the Resize step as a Breakpoint you can adjust the cropping
Winfried
-----
migrated to Windows 10 in Nov. 2019
PWP Pro 64
CUDA not available
Post Reply