1

I have two thousand PNG images. I need to scale up the images to place it inside the whitebox; also the edges of the images should touch the red color in any two sides (shown arrow below)

how to automate this in Photoshop? Or is there any other software?

Sample images are given below:

image should touch in any of the sides

sample image

The output should look like this:

sample image

1

If your template has a fixed size for all of them. you could use absolute coordinates on actions to achieve this.

Record an action with the following steps (assuming all of your images are horizontal rectangles)

  • Open the image
  • Steps to generate or paste this red template
  • Rescale the image to fit the desired borders, set up only horizontal size so the aspect ratio is kept intact.
  • Set the anchor point to the leftmost point of the rectangle
  • Type in absolute pixel/cm/in coordinates for the horizontal position
  • Create a selection with absolute coordinates regarding the white area
  • Align to center

In case of vertically oriented images, i'd create two separate action sets for horizontal and vertical images. Although i don't think this is an elegant approach, but it would work pretty well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.