Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch Photoshop Action. Increase Canvas Size based upon Width and Height

Status
Not open for further replies.

axLW

Programmer
Feb 6, 2015
110
GB
Hello, I have recently discovered batch Photoshop actions. They have literally changed my life.

However, I have a connundrum, there is one action that I do not know yet how to automate.

I have a large collection of images. None of the images are square shaped, they are all rectangular.

It should also be noted that the backgrounds are always white and by increasing the canvas side I can infact increase the image dimensions without any sign of doing so.

The problem I have is that some of the images are wide and some are tall.

Let's say an image is

width: 1200px, height 800px

As the width is greater than the height, I would want an action that automatically matches the height to be the width, so it should increase the canvas size (equal on both sides) to match the width. Leaving me the same image with both a width and height of 1200px.

Vice versa, if an image is 400px x 768px, I would want an action to increase the width (by increasing canvas size equally on both sides) to match the height, leaving me with an image 768px x 768px.

Is this possible?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top