I'm looking for a way to batch resize photos to a particular ratio without cropping. For example, if I have pictures with 2x3 ratio which is default for my camera and I want to print it with 5x7 ratio which is a bit narrower, I will lose part of the pictures if I cropped it 5x7. Instead I want to fill part of the pictures with either white or black color and centering the images. (even at one side is fine)

If there's Photoshop Action that can do it, it will be ideal. the sizes mentioned above are just example. It will be good if I can set the destination photos size. The pictures I have are in various sizes, 2x3, 5x7, 16x9, and some squares. (it's fine if it's from one size to one size. I can group pictures with same ratio and run action a few times)

I know there are answers for normal resizing but I can't find the one which will fill and resize the pictures.

  • 2
    if you print a 2x3 picture on a 5x7 sheet, part of the sheet will remain white anyway (assuming the sheet was white to begin with). no need to fill the border with white.
    – ths
    Apr 18, 2017 at 8:51
  • sorry, forgot to mention I will be uploading to photobox to print the photos so basically they will apply auto cropping on the photos to meet the print size and I don't want to lose part of the photo.
    – Laurence
    Apr 18, 2017 at 9:24
  • i'm pretty sure they offer a "Shrink to fit" option?
    – ths
    Apr 18, 2017 at 9:44
  • 1
    no, it does exactly what it says on the tin ( photobox.co.uk/shop/prints/standard-prints ):"Shrink to fit allows you to get your whole photo printed. Your image isn’t cropped but you will get white edges along two sides (usually the two longest sides)." In other words, it's shrunk proportionally, without stretching.
    – ths
    Apr 18, 2017 at 10:20
  • 1
    The above comment chain shows that your question is an XY problem, that you are asking about your attempted solution rather than the actual problem. Please edit your comment about uploading to Photobox (the actual problem), so that @lawphotog can make their comment(s) into an answer that can be accepted.
    – scottbb
    Apr 18, 2017 at 15:23

1 Answer 1


You can do this with xnView or xnConvert. Both are free tools.

For each batch conversion you can add multiple commands, resize the image to a certain size, fill with colour if needed, follow orientation, etc.

There are Windows, Mac and Linux versions available. They have a support forum in case you need help using those tools.

P.S. not related to xnView, just a happy user.

  • 1
    While XnView really is great for such batch conversions of all kinds for jpegs, as far as I see it is not able to write DNG files. So if your goal is to crop DNG (or possibly other raw formats), XnView might read them correctly, but the cropped can then only be for example a tiff image.
    – smow
    Apr 19, 2017 at 8:47
  • Hi @smow I have tried both XnView and XnConvert. It doesn't do what I wanted to do so far. Maybe I'm missing something to use such a complex UI. I have tried canvas resize. It sort of do what I want to do if I choose a really big canvas size. It places my picture in the center. But I get white bolder all 4 sides. Obviously not what i want. If the canvas size is smaller than my picture it doesn't 'shrink to fit'. It just cropped my picture at the center. So I only got part. I also tried normal resize, no joy there at all. What's the right combination of commands to achieve what I need?
    – Laurence
    Apr 20, 2017 at 18:57

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.