Adjust Image size by Long Edge

We have this option in Bridge, but I can’t seem to find it in Photoshop so I can try and write into my plugin. The reason I’d like to do this, is so I can run my sharpening along with the resize and save. Helps keep those vertical shots the same resolution as the horizontal shots.

Thanks!

You’re going to have to write your own logic:

const doc = app.activeDocumemt;

if(doc.width > doc.height) {
  // Landscape logic
} else if (doc.width < doc.height) {
  // Portrait logic
} else {
  // 1:1 logic 
}

Or if you want to be fancy do it via image ratio rather than width/height.

1 Like