Skip to main content
Inspiring
December 20, 2012
Question

Batch processing images of various sizes

  • December 20, 2012
  • 2 replies
  • 15978 views

I'm trying to create 125 pixel square thumbnail images using a batch process and I'm having trouble getting it to work consistently with images that have different aspect ratios. I think I know why it's working the way it is, but I don't know how to work around the function. Here is what I'm doing that doesn't work when the image proportions change:

1. Resize image to 125 pixels high using the "constrain proportions" option.

2. Resize canvas to 125 pixels wide, thus cropping the sides to create the square image.

Then I have another process that does the same thing with images in portrait orientation. The problem is, I have some images that are 640x480, for example, and some that are 640x360. If I create the command using a 640x480 image, the 640x360 images are skewed when run through the batch because the "resize image" step is actually setting the dimensions of the image, rather than maintaining the proportions of that particular image. I thought about setting the canvas to a square first, but since not all my images are the same dimensions, I'm not sure how to account for that.

Anyone have any thoughts? I also have Photoshop, but as a novice, I've found Fireworks to be a little more intuitive for some of these basic commands, particularly batch processes.

Any help would be appreciated. Thanks so much!

Jeremy

    This topic has been closed for replies.

    2 replies

    Participant
    August 17, 2016

    Hi Jawmusic, I had the same problem with the batch square crop images.

    And I realized the handy photoshop action to make it easy and fast.

    You can buy it here:

    https://creativemarket.com/GraphicTreasury/960409-Auto-Crop-Image

    It cuts square and circle region from the center of your photos.

    You can work with any source aspect ratios and proportions, and use the batch processing without additional actions from user side.

    groove25
    Inspiring
    December 20, 2012

    Wow, it was a bit tricky to follow your question!

    Check out the "Scale to Fit Area" option within the Batch Process Scale command. Another user recently reported problems with this option being unable to upsample small images, but as long as you're using it to downsample large images, it should work as an effective substitute for the first step of the two-step process you've outlined. The idea would be to set Max Height to 125px and then set Max Width to a dimension larger than the photos you're processing, so that image height will be 125px and width will simply be scaled in proportion.

    jawmusicAuthor
    Inspiring
    December 20, 2012

    Thanks for the reply. I'm able to get the scaling to work properly using the method you suggested (I actually figured that out a few moments before your response). However, now I can't get it to crop the pictures properly. Once the pictures are at 125 pixels in one of the two dimensions (125x200, for example), I want to crop the image so it's 125 square as well. When I open one of the resized images and set the canvas size to 125x125, it works for that image. When I try to run that command as a batch, it just resizes the image again (to say 80x125) and fills the empty canvas space with white instead of actually cropping the images.

    Sent from my Verizon Wireless 4G LTE DROID

    groove25
    Inspiring
    December 21, 2012

    It seems tricker than one might expect to create square thumbnails!

    I'm a little confused by the results you're describing. When I try using Modify > Canvas > Canvas Size to crop a document, the result appears in the History panel as "Crop Document". If I select that step and choose "Copy Steps to Clipboard", then paste the results in a text file, I get something like this:

    fw.getDocumentDOM().setDocumentCanvasSize({left:16, top:0, right:141, bottom:125}, true);

    This reveals that the canvas is being cropped according to a specific bounding rectangle that may or may not be a great fit for all the other images being processed (depending on their widths). For a more foolproof result, a rectangle like {left:0, top:0, right:125, bottom:125} would be a better choice; however, aesthetically, I'd personally prefer that images be cropped from the center, not the left side.

    If I had something better to suggest here, I would. It might be worth checking out Photoshop to see if this type of operation is any easier. Here's one online tutorial on the subject: http://demosthenes.info/blog/347/PhotoShop-Batch-Processing-Generating-Image-Thumbnails-via-Automated-Crop-&-Resize