Image Resize

This is a typical example for the use of command line tools, which you would normally use by typing into a Terminal window. Because sometimes there are several options to remember, this is not always an easy task. It would be much nicer to get some TurboTool actions prepared, which work by D&D and call these tools in the background.

To get an impression what's possible, this example uses the image manipulation tool convert, which is part of the free ImageMagick package. You may download it from here (12.7 MB).

That is how the resulting droplet should work: I do have the image in question opened in a window of Preview, D&D the icon from the window's title bar to the droplet and voilá:

OK, how is this done?

We want to resize the dropped image by 50%, and due to limitations of convert, restrict this new action to jpg, tiff, tif and gif images. These two atomics will do the job:


The first atomic (Check Input Files) will only allow a Single File of type Files only to pass through. Additionally the file extension must match one of jpg, tiff, tif or gif.
The second atomic (Run script file) is much more complex, but it is by far the most powerful type of atomic. You will need some knowledge of UNIX to create your own shell scripts, but this one will be explained thoroughly.
As the popup menu First line of script determines, a tcsh shell script will be performed. This is the default shell for Terminal but not the only one. That's the description of the single lines of the script:

Well, tough stuff, isn't it? But the resulting action is it worth! We create a droplet from this action and place it onto the Desktop:


Last update: August 19, 2002