I want to write a simple Automator action to scale an image to an an arbitrary percentage. Using the standard Automator actions, I don’t think that’s possible - I need to set the size in the action itself.
My thought is that by adding a Run JavaScript action, I should be able to ask for the percentage and scale the image that way. I’m using JavaScript because I know it well, and feel more at home with it than working with AppleScript.
In the Script Editor, the library includes Image Events, which appears to have a scale
method.
Is it possible to access this library from JavaScript in Automator? How would I do that?
I’m on MacOS Big Sur.