Script Editor Icon

Inserting image manipulation commands into your script

Image manipulation routines use the Image Capture application to process JPEG images. You can insert image manipulation commands into your script using the shortcut menu (also known as the contextual menu).

Important: Do not use these routines to process image types other than JPEG, as damage to the image file may result.

To add image manipulation commands to a script:

Step 1

Select the image in the script. Usually this is the name of the variable that contains an alias reference to the image file. Optionally, you may select an alias reference itself.

Note: These image manipulation routines will not work with POSIX, Finder, or file reference types. They will work only with those references in alias format (for example, alias Macintosh HD:Images:House.jpg).

Step 2

Control-click in the selected area.

Step 3

Choose Image Manipulation, and then choose the routine you want from the shortcut menu:

Resize: Resizes the image to an indicated dimension.

Rotate Clockwise: Rotates the image 90 degrees to the right.

Rotate Counter-Clockwise: Rotates the image 90 degrees to the left.

Scale: Scales the image to an indicated percentage.

The image manipulation routine is inserted into the script text after the selection.

Related Topics

shortcut menus