Skip to main content
Participant
December 4, 2024
Question

Batch Cropping using Actions

  • December 4, 2024
  • 4 replies
  • 459 views

I have a set of images that need to be cropped only in width and not height.

There are several images with different heights but I just need the width cropped. When I run the action it automatically makes all the images the same height as the first one. Can anyone help me with this, its a bit urgent.

This topic has been closed for replies.

4 replies

Participant
December 11, 2024

Record Action:
select all
transform selection to desired width OR height
crop
deselect all
image size (to desired final width OR height,  ...if required)
save
close

run action on other images using file>batch.

 

 

Stephen Marsh
Community Expert
Community Expert
December 11, 2024
quote

image size (to desired final width OR height,  ...if required)


By @default6dy9119zq5ba

 

Just a note, actions record relative % even when the transform is set to px, so if you need to crop by px values, one can create a smart object layer and edit that using image size in px, which will record explicit px values, not %. Close and save the smart object. Then load a selection and crop from the smart object layer. Delete the smart object layer.

Bojan Živković11378569
Community Expert
Community Expert
December 5, 2024

We need more information to help you with specific instructions. Otherwise, try @Stephen Marsh  suggestion to use Canvas Size.

Stephen Marsh
Community Expert
Community Expert
December 4, 2024

@shakieintheloop 

 

Those image attachments are invalid.

 

You can record changing the canvas size into an action, only changing the width. 

 

This could be a single step, centre anchor point, cropping the same amount from both left and right sides.

 

Or, if both sides require different values, this could be two steps: setting the anchor point on the left, adjusting the value so that the right-hand side is cropped, and repeating vice versa for the other side.

 

Another option is to setup a "crop file" where you load a selection and use that for batch cropping in the action.

c.pfaffenbichler
Community Expert
Community Expert
December 4, 2024

Please post meaningful screenshots, including the fully expanded Action in the Actions Panel, the Batch settings etc. 

Edit: What is the target width, what are the current pixel dimensions of the images? 

 

And please post them with the »Insert Photos«-button.