To add image manipulation commands to a script:

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

Control-click in the selected area.

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.