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:
set outfile=%unique.$1:e The convert tool needs an output file to write its result to. This line creates a filename which is unique (%unique is a TurboTool variable). The file extension is taken from the file $1, which is the file on the FileWell. $1:e is a special syntax of the tcsh and means 'extension' of the filename.
/usr/local/bin/convert -geometry 50x50% "$1" $outfile This line actually calls convert with some options and resizes the file $1 into the new file $outfile
open $outfile To present the result to the user, another command line tool is used. It opens the file with its default application, as if it has been double-clicked in Finder.
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: