My goal is to achieve the following:

Batch resize images with different background colors

I already use Photoshop to batch process and center (horizontal and vertical align) 2000 different images into square 200 x 200 tiles on a white background (the images are different in size, background color, and sometimes file-type).

I can process and batch resize the images and place them on a white 200x200 tile using the batch processor and recorded 'Actions'. With transparent .png images this looks great.

Problem: Some of the images have a colored background. If an image has a colored background a white border around the image looks quite awful.

This is how the output currently looks:

enter image description here

How do I dynamically resize the non transparent images of different colors and sizes to 200x200 square .jpg images? I can do it manually with the color-picker but is there another option?

As you can see it is only a problem when images have a colored background.

2 Answers 2


If the images are not at 1:1 aspect ratio, you could try editing the problematic ones before you do the batch processing, to make them the right aspect ratio.

So, open one of these images, change the canvas size so the aspect ratio is 1:1 (i.e, so that the width and height are exactly the same), unlock the background layer. Add a new background layer under the graphic, and fill with the same colour as the graphic's background, flatten the layers and save.

Another possibility is Content Aware Scaling, although I don't know how well it will work on a graphic as it's generally intended for photographs.

  • Thank you for your response. How do I record the following as an 'Action' in Photoshop? (Add a new background layer under the graphic, and fill with the same colour as the graphic's background) Commented Feb 15, 2018 at 14:34
  • If I could record the action to use the 'color-picker' tool on 1 pixel in the top left corner that would be great. Commented Feb 15, 2018 at 14:35
  • I'm not entirely sure how well this will work for for you, but you can record tools in actions in the newest CC versions of Photoshop, but you need to enable it first. It's not enabled by default. In the Actions window, hit the menu icon, and check the option "Allow Tool Recording". I just tried it and it does record the use of the eyedropper. Creating new layers and Edit > Fill (Shift+F5), will also work in Actions.
    – Billy Kerr
    Commented Feb 15, 2018 at 18:29

Recolor logo

I was able to get the action to work on a few tests, with the constraints being:

  • There must be one layer
  • The layer must be unlocked
  • The layer must be named "Layer 1"
  • The logo must be white on colored background

NOTE: The color eye dropper sample will come from the upper left corner of the logo canvas. (Thanks @Billy Kerr -- that Tool Recording is really helpful.)

Download: https://www.dropbox.com/s/u2p8j9xv9tjzwcd/Recolor%20Logo.atn?dl=0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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