How to create automator action to resize images to a certain width?
January 19, 2008 8:37 AM   Subscribe

How do I create an automator action to resize images to a certain width? The "scale images" action only resizes the longest side, which is sometimes the height, not the width.

I want a quick action to resize images for blog posts, so they are 470px wide, no matter what. Images that are taller than they are wide get the height scaled down to 470px, but then the width is less than 470px.
posted by krunk to Computers & Internet (7 answers total) 2 users marked this as a favorite
 
What program?
posted by desjardins at 8:40 AM on January 19, 2008


Response by poster: Just using automator actions -- the built-in "scale image" action.

Since posting this I've found an applescript to do exactly what I want, but it would be cool to do it in automator.
posted by krunk at 8:47 AM on January 19, 2008


oh - if you're on a Mac, you should probably say that in your OP.
posted by desjardins at 8:48 AM on January 19, 2008


Response by poster: sorry -- automator is a mac-only application, figured it was implicit.
posted by krunk at 9:02 AM on January 19, 2008


By chance, I was making something like this the other day. I didn't realize that the Preview Automator action was actually like a "fit within x pixels square" action. So if there's no way to do it with preview, you might try downloading a couple other image programs and seeing if they have actions in Automator. I know, kind of a pain, but you should probably have seashore or something anyway if you're editing images.

Another tip: if you put the automator action inside the folder
(username)/Library/Workflows/Applications/Finder
they will show up in the context menu, it's super handy. you might have already known that.
posted by BlackLeotardFront at 10:08 AM on January 19, 2008 [2 favorites]


Response by poster: Nice, I didn't know that, thanks.

I'm trying to write my own Automator action in AppleScript right now from this tutorial: http://developer.apple.com/documentation/AppleApplications/Conceptual/AutomatorTutorialAppleScript/Introduction/chapter_1_section_1.html

Kind of overkill, but I'm a nerd, what can I say?
posted by krunk at 10:23 AM on January 19, 2008


Another way to do it is run them through sips:

mkdir Converted; sips --resampleWidth 470 --out Converted *.jpg

posted by nathan_teske at 11:04 AM on January 19, 2008


« Older What's wrong with my car?   |   O mystical credit gods Newer »
This thread is closed to new comments.