aheckmann/gm — pull request #108 by dambalah (2012-12-13 22:07:34+00:00)
Title: Fixed autoOrient to work with all types of EXIF orientation

The autoOrient function was throwing errors when used with graphicsmagick because graphicsmagick does not support the -transpose and the -transverse options. Also, graphicsmagick uses -flip and -flop instead of -flip vertical and -flip horizontal.

The previous tests only covered one case for auto orientation and that case did not reach the -transpose and -transverse portion of the code so no errors were thrown.

There are many more possible cases. I added a test suite that tests all 16 possible cases, inspired by the information in the following resources:
* http://recursive-design.com/blog/2012/07/28/exif-orientation-handling-is-a-ghetto/
* http://www.80sidea.com/archives/2316
* http://www.impulseadventure.com/photo/exif-orientation.html
* http://www.exif.org/Exif2-2.PDF