Skip to content

Commit f9c69de

Browse files
Yay295radarhere
andauthored
simplify setting self._size
Co-authored-by: Andrew Murray <[email protected]>
1 parent c0d04e8 commit f9c69de

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/PIL/EpsImagePlugin.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,10 @@ def read_comment(s: str) -> bool:
361361
raise OSError(msg)
362362

363363
# An "ImageData" size takes precedence over the "BoundingBox".
364-
if imagedata_size:
365-
self._size = imagedata_size
366-
else:
367-
self._size = (
368-
bounding_box[2] - bounding_box[0],
369-
bounding_box[3] - bounding_box[1],
370-
)
364+
self._size = imagedata_size or (
365+
bounding_box[2] - bounding_box[0],
366+
bounding_box[3] - bounding_box[1],
367+
)
371368

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

0 commit comments

Comments
 (0)