1
0
mirror of https://github.com/sjlongland/tornado-gallery.git synced 2025-09-13 08:42:23 +10:00

photo: Flip dimensions if EXIF data says so.

This commit is contained in:
Stuart Longland 2018-04-19 10:44:19 +10:00
parent fe78dcedf0
commit 93906b8a46
Signed by: stuartl
GPG Key ID: 6AA32EFB18079BAA

View File

@ -77,10 +77,14 @@ class Photo(object):
@property
def width(self):
if self.orientation in (5, 6, 7, 8):
return self._get_property('height')
return self._get_property('width')
@property
def height(self):
if self.orientation in (5, 6, 7, 8):
return self._get_property('width')
return self._get_property('height')
@property