6 Replies Latest reply on Nov 9, 2016 10:44 PM by graphict2986600

    Batch processing images of various sizes

    jawmusic Level 1

      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!



        • 1. Re: Batch processing images of various sizes
          groove25 Level 4

          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.


          scale to fit area.png

          • 2. Re: Batch processing images of various sizes
            jawmusic Level 1

            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

            • 3. Re: Batch processing images of various sizes
              groove25 Level 4

              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-vi a-Automated-Crop-&-Resize

              • 4. Re: Batch processing images of various sizes
                jawmusic Level 1

                Yeah, that explains the problem I’m having. When I crop a portrait-oriented image, and then use that command on a landscape image, it’s actually cutting the top off, not doing what I described. So for example if it’s cutting 20 pixels off the top of the portrait image, it’s doing the same thing in the landscape image and filling the remaining pixels at the bottom with white. I don’t know enough about the javascript fix what’s happening, but I can tell from those coordinates what it’s actually doing. I was hoping that it would remember precisely what I asked it to do (crop from the center, making the image 125x125) rather than remembering it from how far from each edge it did the cropping. I appreciate your help. I was hoping to avoid having to use Photoshop because I’m much more comfortable with Fireworks, and I’ve read horror stories about batch processing in Photoshop. I’ll see if I can find a solution or maybe somehow alter the javascript of the existing function to work properly. Thanks again for your suggestions.





                • 5. Re: Batch processing images of various sizes

                  Hi Jaw


                  I had the same problem and I thought I was going mad. I am not a trained Photoshop expert but this is what I did to generate same sized thumbnails with images of various aspect ratios and different file sizes without ending up with the large white canvas fill as you experienced.


                  Lets say I am making 600 x 450 px thumbnails.


                  Record and run the following actions:

                  1. Image | Image size
                    1. Check Resample image and choose Bicubic Sharper
                    2. In Pixel Dimensions, change height to 450 pixels
                    3. Press OK
                  2. Image | Canvas size
                    1. Set width in 600 pixels
                    2. Choose your anchor point



                  • 6. Re: Batch processing images of various sizes
                    graphict2986600 Level 1

                    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:



                    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.