Hello,
I’m trying to use GraphicConverter’s lossless JPEG rotation to make a droplet that will batch-process a group of JPEGs. However, the dictionary is somewhat unclear, and I was getting errors trying to use the command from AppleScript. It works fine when done manually.
Here is the dictionary entry:
rotate jpeg lossless: rotates a jpeg file lossloess
rotate jpeg lossless
to angle integer -- angle (supported are 90, 180 and 270)
There is no indication on how to specify what should be rotated.
It turns out that the dictionary should probably read
rotate jpeg lossless: rotates a jpeg file lossloess
rotate jpeg lossless "file or alias"
to angle integer -- angle (supported are 90, 180 and 270)
(the “file or alias” part would be italicized, and is the part that is missing in the current dictionary).
So, for example:
set angleToRotate to 90 -- will rotate it 90 degrees clock-wise
set imageAlias to alias "Drive:Users:username:somefile.jpg"
tell application "GraphicConverter"
rotate jpeg lossless imageAlias to angle angleToRotate
end tell
Note that this will not rotate the icon if the icon is a “preview” of the image.
Thought this could be helpful, as it took me a while to figure it out.