mac & Applescript | Resizing Images using a droplet
April 5th, 2009 at 14:59Sometimes you need a quick rescale / resize option for pictures, i.e. if you prepare images for your blog or similar.
For sure there are several free and non-free applications available offering this function, but why not just using some self-configured AppleScript-Code ?
The following code is based on a hint on macosxhints, but slightly modificated.
Description
The target is to create a small Applescrip-baed Droplet-Appliction which resizes /rescales all items and saves them on the current location using a modificated name.
Sounds easy … and yeah it IS easy.
But check the code yourself, i hope it is documented enough.
Code

Basically the script supports 2 modes
- 1 – images gets rescaled based on a defined fix value
- 2 – Dialog appears to define the width for each single image
The main target was to show how you can easily use AppleScript & Image Events to work with images. Based on that core-script you should be able to write more advanced snippets which might fit your needs much better then my example above.
Download
I saved the script as editable .app file – if you want to edit it, just open the .app in Script Editor
As mentioned above – the basic idea is from macosxhints – so see the link above if you want more informations.



April 6th, 2009 at 07:49
Sehr gut geschrieben. Ich habe für sowas bis vor kurzem einen Automator Workflow verwendet, der als Finder Plugin integriert war.
Mittlerweile verwende ich das ImageMagick im Terminal. Geht deutlich schneller.
April 6th, 2009 at 11:13
mh, würde meine Macports Installation nicht mal wieder rum-zicken würde ich mich endlich mal an IM setzen … wird wohl wirklich zeit das Tool mal richtig zu verwenden.
Danke nochmal für den Hinweis – ich bin mal Abhängigkeiten fixen
April 6th, 2009 at 22:29
@fidel: macports ist genial. Und IM möchte ich nicht mehr hergeben. Genau das richtige für die Terminal Freaks.
April 7th, 2009 at 02:34
jo, nur beim letzten rumgefrickel hab ich was kaputt geschraubt …. muss ich erstmal fertig fixen bevor ich wieder installieren kann