simplify setting self._size

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Yay295 2024-10-01 09:35:22 -05:00 committed by GitHub
parent c0d04e8b34
commit f9c69deaae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -361,13 +361,10 @@ class EpsImageFile(ImageFile.ImageFile):
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))