diff --git a/Tests/test_image_resize.py b/Tests/test_image_resize.py index b278c841d..f8c9bf1a1 100644 --- a/Tests/test_image_resize.py +++ b/Tests/test_image_resize.py @@ -292,10 +292,7 @@ class TestImageResize: def resize_scale(mode: str, scale: float) -> None: img = hopper(mode) - size = ( - int(self.width * scale), - int(self.height * scale) - ) + size = (int(self.width * scale), int(self.height * scale)) out = img.resize(scale=scale) assert out.mode == mode assert out.size == tuple(size) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 043a5e952..bd1151b6c 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2290,12 +2290,9 @@ class Image: if reducing_gap is not None and reducing_gap < 1.0: msg = "reducing_gap must be 1.0 or greater" raise ValueError(msg) - + if scale: - size = ( - int(self.width * scale), - int(self.height * scale) - ) + size = (int(self.width * scale), int(self.height * scale)) self.load() if box is None: