Skip to content

Commit

Permalink
Rearranged code
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Karpinsky <homm86@gmail.com>
  • Loading branch information
radarhere and homm authored Sep 18, 2024
1 parent 84e275d commit a859695
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,12 +1421,8 @@ def _setup(self) -> None:
if not isinstance(xsize, int) or not isinstance(ysize, int):
msg = "Invalid dimensions"
raise ValueError(msg)
self._will_be_transposed = self.tag_v2.get(ExifTags.Base.Orientation) in (
5,
6,
7,
8,
)
orientation = self.tag_v2.get(ExifTags.Base.Orientation)
self._will_be_transposed = orientation in (5, 6, 7, 8)
if self._will_be_transposed:
self._size = ysize, xsize
else:
Expand Down

0 comments on commit a859695

Please sign in to comment.