Question

I want to move to GraphicsMagick because I'm only resizing and rotating photos, and I heard it was a little faster. But it doesn't take the -auto-orient option directly. Is there another way to do this efficiently? The Imagemagick convert -auto-orient option will read the EXIF orientation tag, rotate accordingly, then RESET the EXIF tag to orientation=1.

see: http://www.imagemagick.org/script/command-line-options.php?ImageMagick=80iu7ek6jb638dl2kin7n3v4d5#auto-orient

Was it helpful?

Solution

Not at this time.

As you said, you can guess the operation to accomplish with a simple switch case. This is taken from an interesting resource page: http://sylvana.net/jpegcrop/exif_orientation.html

switch EXIF:Orientation:
  1) transform="";;
  2) transform="-flip horizontal";;
  3) transform="-rotate 180";;
  4) transform="-flip vertical";;
  5) transform="-transpose";;
  6) transform="-rotate 90";;
  7) transform="-transverse";;
  8) transform="-rotate 270";;
  *) transform="";;

OTHER TIPS

Version 1.3.18 of GraphicsMagick (released March 10, 2013) added support for the -auto-orient parameter on the 'convert' tool.

Quote from GraphicsMagick News page: "convert/mogrify: Now support -auto-orient to automatically rotate the image upright"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top