Skip to content

Commit a859695

Browse files
radarherehomm
andauthored
Rearranged code
Co-authored-by: Alexander Karpinsky <[email protected]>
1 parent 84e275d commit a859695

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/PIL/TiffImagePlugin.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,12 +1421,8 @@ def _setup(self) -> None:
14211421
if not isinstance(xsize, int) or not isinstance(ysize, int):
14221422
msg = "Invalid dimensions"
14231423
raise ValueError(msg)
1424-
self._will_be_transposed = self.tag_v2.get(ExifTags.Base.Orientation) in (
1425-
5,
1426-
6,
1427-
7,
1428-
8,
1429-
)
1424+
orientation = self.tag_v2.get(ExifTags.Base.Orientation)
1425+
self._will_be_transposed = orientation in (5, 6, 7, 8)
14301426
if self._will_be_transposed:
14311427
self._size = ysize, xsize
14321428
else:

0 commit comments

Comments
 (0)