3 Replies Latest reply on Jan 6, 2018 9:42 PM by ilovelenny

    HOW TO: Action to resize & center crop images of various sizes

    Cmroz Level 1

      Hello,

      I've gotten a lot of help here over the years so I wanted to share an action I created. I needed to resize and automatically center crop images of various sizes for my company's website. For example: All images needed to be 900px x 460px 72dpi - and because input images were from many different sources, the dimensions were different for each image. It seemed straight forward at first (sort of) but I couldn't find a way of doing this without a script or some third party program - so I came up with the following action. Hope someone gets some use out of it.

       

      Note: Change action as needed to suit your needs.

       

      Resize and Center Crop (Auto)

      Fit Image

           height: 900px

           width: 900px

           With Don't Enlarge

      Canvas Size

           height: 460px

           vertical: center

           extension color: white

      Image Size

           width: 900px

           resolution: 72 per inch

           with scale styles

           with constrain proportions

      Save (optional)

           As: JPEG

           Quality: 12

           Scans: 5 (for web images)

       

      This assumes that the images are at least horizontal, but if you have photoshop CC you can create a conditional action that will work with vertical and horizontal images. If you are square cropping, this action makes it a breeze. I also have an action that uses the same basic logic, but lets me manually move the crop box. The only real issue I have encountered is when the original image ratio is very narrow, which leads to some white space on the top and bottom (I'm working on updating the action to address this). But it has worked on about 95% of my images. Again, you will probably need to adjust all of the variables depending on what you are trying to do, but it should be possible with the same steps. And of course this can also be used to batch process.

       

      Feel free to let me know if anyone comes up with improvements! Thanks