Skip to content

Commit

Permalink
simplify setting self._size
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Murray <[email protected]>
  • Loading branch information
Yay295 and radarhere authored Oct 1, 2024
1 parent c0d04e8 commit f9c69de
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/PIL/EpsImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,10 @@ def read_comment(s: str) -> bool:
raise OSError(msg)

# An "ImageData" size takes precedence over the "BoundingBox".
if imagedata_size:
self._size = imagedata_size
else:
self._size = (
bounding_box[2] - bounding_box[0],
bounding_box[3] - bounding_box[1],
)
self._size = imagedata_size or (
bounding_box[2] - bounding_box[0],
bounding_box[3] - bounding_box[1],
)

self.tile = [
ImageFile._Tile("eps", (0, 0) + self.size, offset, (length, bounding_box))
Expand Down

0 comments on commit f9c69de

Please sign in to comment.