I have a folder full of landscape and portrait oriented photos of a product (2000) and I need to fit all of them in square canvas. I know I could use Photoshop actions to do it in batch, but I do not know what method could I use in order to do it.

So far I run into problems that some pictures have different size, so I cannot simply change the Image Canvas to a specific size, also I do not know how to deal with the fact that some of the pictures have different orientation then others.

How would it be possible to automate this task using Photography editing software? I have Photoshop, Picasa etc.

  • Never done this but I suspect you are using the wrong tool and may be in the wrong forum. Have you tried collage software (Picasa has that feature)? Otherwise I would like at graphic design & layout software (and ask in the right forum if you do not know those). – Itai Apr 28 '12 at 16:02
  • 2
    Hmmm. Maybe this is me being a bit stupid, but how could you batch change all photos to squares? - surely you need to know where your subject is in the frame? – Rob Apr 28 '12 at 17:18
  • @Rob, not sure how Kristaps want's it done, but I usually shoot as if the frame was square, so each shot is centred for square cropping anyway – TFD Apr 29 '12 at 9:46
  • 1
    @Kristaps: Do you intend to print a "collage", wherin all of the landscape photos are arranged, fit, and printed on a SINGLE canvas? Or do you simply need to resize & crop each landscape photo such that it can fit nicely in a square canvas print? The two are very different things, and it seems people are interpreting your question both ways. Some clarification is needed to really get you the answers you need. – jrista Apr 29 '12 at 16:48
  • @rob, landscape? guess the whole picture is the subject... – Roger Apr 30 '12 at 7:20

With Photoshop you can use Image Processor Pro (link - scroll half way down page) to process images that will resize your photos to a specific size while maintaining aspect ratio. You could run an action to crop (aka - reduce canvas size) but as @Rob said if you do not know where the subject is how can you batch photos and crop them? You may have to do this manually. I do not know if other programs they will achieve what you are looking for but check out Image Processor Pro as it has several good tools for batching photos.


The excellent free product www.irfanview.com will do this fine

It has a batch mode (B key), and the Advanced options button allows you to crop/resize to any aspect size and ratio, with many options regard how this is calculated etc


If you are willing to use java, here is code I used to make images square. After this you can easily fit those in fixed size square canvas using photoshop.

BufferedImage image = ImageIO.read(IMAGEPATH);
int w = image.getWidth();
int h = image.getHeight();
BufferedImage square= new BufferedImage(Math.max(w,h),Math.max(w,h),BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D) combined.getGraphics();
g.drawImage(image, (Math.max(w,h)-w+1)/2, (Math.max(w,h)-h+1)/2, null);
// Save as new image
String fileName=image.getName();
ImageIO.write(combined, "PNG", new File(path, fileName.replace("jpg","png")));

Here how I do it for my online store

How to prepare picture for magneto: using xnconvert:

  1. batch crop the white space in all the image using the source folder setting
  2. re-size all the images to 500 pixel - or any size depending on the quality of your images - on the longest side
  3. re-size the canvas to 500 x 500 or to the size you've chosen

Done... ;-)

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.