Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I resize a batch of images using Automator, so that all images will have a fixed height, e.g. I want to resize all images to be 60px high while width can be anything.

share|improve this question

4 Answers 4

You can also batch-resize images from Preview:

Or install ImageMagick with brew install imagemagick or sudo port install imagemagick and use something like this:

for f in *.png; do convert $f -filter lanczos2 -resize x60 -quality 93 ${f%png}jpg; done

More examples:

# modify images in place and make images larger than 1280x1280 pixels smaller
mogrify -filter lanczos2 -resize '1280x1280>' *.png

# save thumbnails to ~/Desktop and make images wider than 500 pixels smaller
mogrify -filter lanczos2 -thumbnail 'x500>' -format jpg -quality 93 -path ~/Desktop/ *.png

# make images smaller or larger and crop them so that they are exactly 200x200 pixels
-resize 200x200^ -extent 200x200 -gravity center

# use a white instead of a black background
convert transparent-bg.png -flatten white-bg.jpg

The default filter for downscaling images is Triangle, which often makes images look too blurry without additional sharpening in my opinion. Triangle is similar to the resizing methods used by Automator and sips. I usually use Lanczos2 (2-lobe Lanczos), which makes images less sharp than Lanczos (Lanczos3 or 3-lobe Lanczos). Lanczos2 is almost identical to Catrom, and it is also similar to the bicubic option in Photoshop.

A comparison of different resizing options: http://lri.me/upload/imagemagick-osx-resizing/index.html

share|improve this answer
    
Now, a bash two-liner more difficult than getting imagemagick set up and having it perform the desired action? Hard to believe ;-) –  Daniel Beck May 13 '11 at 8:20
    
Wow, I've been on OS X for over a decade now and I didn't know that Preview was capable of batch editing! That's totally awesome as it's available on every Mac and dead simple to use. Even batch conversion of file formats is possible and works analogous to resizing: goo.gl/wQ1osW –  Stefan Schmidt Jan 25 at 17:55

If you want an easy to use drag-drop tool to do this then you can use an application I develop called ImageXY. It resizes to width or height or fixed dimensions both in pixels and percentages. Also makes use of all your modern CPU's cores and so can resize 100 DSLR photos to web sizes in ~5 seconds.

share|improve this answer

Preview is certainly a good solution for some occasional resizing. There are also other nice free options, such as ImageMagic (command-line utility), Preview or something else plus Automator, etc.

However, if this is a part of your job and you need a true flexibility, a special-purpose application will save you a lot of time, and offer much more opportunities. Many users chose our batch image resizer Resize Sense (http://veprit.com/resizesense) for its outstanding flexibility and convenience.

Disclaimer: I am the developer. You better judge Resize Sense yourself. The introductory video on the product website will tell you exactly what is so special in Resize Sense. There is a free demo version.

share|improve this answer

Use (install) the Action "Save for Web" available in http://junecloud.com/software/mac/junecloud-automator-actions.html.

Worked for me :).

You can specify a maximum with and Height for the image.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.