Sunday, December 18, 2011

Batch Resize Images, With Automator




Hey I did a post a while back about Resizing Images using Apple Script. Its an old post, however it does have some good points. For people who don’t know how to use AppleScript it can be a bit complicated. This post is going to show you how your can batch resize images using Preview (which has slowly become more powerful) and then move this into an Automator script. Its a good simple way to resize images and is quick and simple.


If you want to learn more about Previews functions I recommend Snow Leopard: The Missing Manual. Its a great book. If you want to learn more about Automator, Automator for Mac is a recommend book, there is a Snow Leopard version available if you are running the latest OS.
Preview


Resizing with Preview, for the most part, is very simple. It can be used for nearly any image size and allows you to determine which value (height or width) you want to change. The process is simple and is as follows:


1) Select your images in Finder.


2) Drag the images onto the Preview icon and let it load.


3) Select all of the images from the sidebar, by either shift clicking the first and last image or Command + A.


4) Go to Tools > Adjust Size and enter either a Width or Height value, it will keep the aspect in relation to the value your enter, its useful to enter a width value if you have a specific value in mind. You can enter two values, however it will change the aspect ratio.


5) Press Save All.





Preview allows your to do this for numerous images. One of the advantages of using Preview is that you can determine what size you want to use, however if you want to use the same value over and over again, this method is a bit clunky, this is where Automator comes in.
Automator


For people who have not come across Automator before, it allows use to run and build tasks with a simple GUI interface. It is designed to build scripts that are simple and don’t need the coding power of something else. In Automator we are going to replicate the same processing, but use Automator Actions. The first step is to open Automator, located in the Applications folder and select workflow from the pop up option.


1) In Automator select the “Copy Finder Items” action and drag it into the work area. Select a copy to location. This is so it preserves the original file (Automator gets a bit panicky when you don’t have it). It should go without saying that you have a copy if you are making changes.


2) Add “Scale Images” from the actions library. Set a size depending on what you need.


3) Add “Save For Web”. Select “Save to” as “Same folder as input”, Use “Preview”, and Type “JPEG”.


4) Save the workflow. Select a name and have the file format as an “Application”.


5) Test by dragging a bunch of image files onto the workflow application.





This allows you to quickly resize and image to the same size every time. From testing the pixel value you enter into the “Scale Images” input is the x value. There is no option for the y values.


Preview and Automator have both disadvantages and advantages. Preview is good since you can choose which size you want, unlike Automator. However Automator is quicker, especially if you want the same size over and over again (such as a website). There is nothing stopping you making different workflows for different sizes.


Have a play and see what you think, there are plenty of improvements which you can make. It all depends on what you want the final script for.

0 komentar:

Post a Comment

 
Design by AsciK Drumming (Muhammad Saref Ascik)