macfidelity

|

rethinking the think-different thing

mac & Applescript | Resizing Images using a droplet

April 5th, 2009 at 14:59

Sometimes 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

20090405_applescript_image_resizer
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.

via

Tags: , , , ,

4 Responses to “mac & Applescript | Resizing Images using a droplet”

  1. core Says:

    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.

  2. fidel Says:

    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 ;)

  3. core Says:

    @fidel: macports ist genial. Und IM möchte ich nicht mehr hergeben. Genau das richtige für die Terminal Freaks.

  4. fidel Says:

    jo, nur beim letzten rumgefrickel hab ich was kaputt geschraubt …. muss ich erstmal fertig fixen bevor ich wieder installieren kann ;)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>