Lossless rotation in GraphicConverter

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.

Does GraphicConverter do the lossless conversion by modifying the exif orientation, or does it do it by setting the quality setting to lossless?

Unfortunately JPEG quality setting of lossless is not truly lossless, I am interested in knowing what Graphic Converter actually does.

Thanks
Kevin

Neither - it literally takes advantage of something that can be done where the JPEG does not need to be re-compressed. It also is not just a tweaking of the EXIF data. GC can correct the EXIF data to account for this, as well.

Lossless JPEG rotation is real, although most editors don’t do it. Read more at http://graphicssoft.about.com/cs/digitalimaging/f/rotatequality.htm