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:
parent
fe78dcedf0
commit
93906b8a46
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user