I have a folder of greyscale images that are of random objects on a white background.

Essentially I need to reduce the size of every image - pixel-wise - by a factor of 1.51. Specifically, I need to reduce the number of non-white pixels by a factor of 1.51. Is there a way to do this without having to go in and change the number of pixels individually - as each of the images has a different number of non-white pixels (i.e. are of difference sizes and shapes)? Thank you!

  • Hi. Welcome to GDSE. Not sure I understand this question to be honest. What do you mean by "reduce the number of non-white pixels"? What about the white pixels? If you rescale an image, all pixels will be resampled. Can you edit your question and provide more information? Perhaps include an example image that demonstrates what you are trying to do. Thanks.
    – Billy Kerr
    Mar 31, 2021 at 17:44
  • Hi - thanks for reaching out Billy! I meant I want to resize the greyscale images in the center without altering the size of the white background.
    – Mk01
    Mar 31, 2021 at 17:50
  • Do you have layered images, i.e. with the background on its own layer, and the greyscale image also on its own layer, or are they just flat images? Also what version of Photoshop are you using?
    – Billy Kerr
    Mar 31, 2021 at 17:55
  • Version 22.2.0 (2021 Photoshop). Right now they are flat images,
    – Mk01
    Mar 31, 2021 at 17:59
  • So… shrink the image, keeping the overall canvas size the same & generating white border to the edges? btw 1.51 might be a bit too specific, depending on your original sizes.
    – Tetsujin
    Mar 31, 2021 at 18:01

2 Answers 2


Alternative suggestion, again you should record this as an action then use it in a batch on copies of your originals.

  1. Image menu > Image size. Set to 66.22%

  2. Image menu > Canvas Size, set to 151% both ways, using the centre of the canvas & setting Canvas extension colour to White.


Open a copy of one image, and record an action as follows

  1. Select > Subject
  2. Edit > Copy
  3. Select > All
  4. Edit > Fill, choose white as fill colour
  5. Edit > Paste Special > Paste in Place
  6. Edit > Transform > Scale. In the toolbar along the top, set a width and height by percentage, and apply the transform
  7. Layer > Flatten Image
  8. File > Save
  9. File > Exit

Stop recording.

Apply the action to an entire folder full of images using File > Automate > Batch. Obviously work on a copy of the folder so you don't overwrite the originals.

Your Answer

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

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