mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Rearranged code
Co-authored-by: Alexander Karpinsky <homm86@gmail.com>
This commit is contained in:
parent
84e275d906
commit
a859695d9a
|
@ -1421,12 +1421,8 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
if not isinstance(xsize, int) or not isinstance(ysize, int):
|
if not isinstance(xsize, int) or not isinstance(ysize, int):
|
||||||
msg = "Invalid dimensions"
|
msg = "Invalid dimensions"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
self._will_be_transposed = self.tag_v2.get(ExifTags.Base.Orientation) in (
|
orientation = self.tag_v2.get(ExifTags.Base.Orientation)
|
||||||
5,
|
self._will_be_transposed = orientation in (5, 6, 7, 8)
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
)
|
|
||||||
if self._will_be_transposed:
|
if self._will_be_transposed:
|
||||||
self._size = ysize, xsize
|
self._size = ysize, xsize
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user