Skip to main content
Participant
August 24, 2023
Answered

Outline cropping 1:1

  • August 24, 2023
  • 4 replies
  • 881 views

The task is to crop a lot of pictures into a square (1:1) format in Adobe Photoshop 2023 on Mac OS.
The original aspect ratio of the picture is 4:3 (horizontally). By default, the crop tool is inside the image and completely fills it vertically so that the left and right parts of the image are cut off. I need to create an automation that will crop images in such a way that the crop field is outside the image vertically and includes the entire original image, creating empty areas at the top and bottom. I can't figure out how to make such an action. Please help. I understand how to do it manually with a separate picture in a 1:1 ratio or with the same proportions. When creating an action with this cropping, each new picture is cropped differently. How can this be automated to make it work?
Please help! Thank you! 

This topic has been closed for replies.
Correct answer r-bin
Flatten the image. Duplicate the layer. Rotate it 90 degrees. Do Reveal All. Delete temporary layer.
 

4 replies

Stephen Marsh
Community Expert
Community Expert
August 28, 2023

@Matthias3186186838nz 

 

You have three replies, did any of them provide the "correct answer" for you? If so, please mark as correct. If not, please describe your issue.

Stephen Marsh
Community Expert
Community Expert
September 9, 2023

As @Matthias3186186838nz appears to have gone AWOL, I have marked correct replies.

r-binCorrect answer
Legend
August 24, 2023
Flatten the image. Duplicate the layer. Rotate it 90 degrees. Do Reveal All. Delete temporary layer.
 
PedroMacro
Participating Frequently
August 24, 2023

try this script

if (app && app.documents.length > 0) {
    var activeDocument = app.activeDocument;
   
    var originalWidth = activeDocument.width.value;
    var originalHeight = activeDocument.height.value;
 
    var squareSize = originalWidth;
 
    var heightDiff = originalHeight - squareSize;
 
    var x = 0;
    var y = heightDiff / 2;
   
    var cropRegion = [x, y, x + squareSize, y + squareSize];
   
    activeDocument.crop(cropRegion);
   
    app.refresh();
} else {
    alert("No Open files.");
}
Stephen Marsh
Community Expert
Community Expert
August 24, 2023

Using fit image and or canvas size is often the key. There are many topics on this, search the forum for keywords such as square or 1:1.