wavexx/fgallery — pull request #13 by thomasd- (2014-01-11 06:42:35+00:00)
Title: Corrected issue #12.

Image height and width are switched when EXIF:Orientation is greater than 4, resulting in a correct calculation of the thumbnail size.
See http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/