mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 17:33:08 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
90a832ef03
commit
c373c498d9
|
@ -292,10 +292,7 @@ class TestImageResize:
|
||||||
|
|
||||||
def resize_scale(mode: str, scale: float) -> None:
|
def resize_scale(mode: str, scale: float) -> None:
|
||||||
img = hopper(mode)
|
img = hopper(mode)
|
||||||
size = (
|
size = (int(self.width * scale), int(self.height * scale))
|
||||||
int(self.width * scale),
|
|
||||||
int(self.height * scale)
|
|
||||||
)
|
|
||||||
out = img.resize(scale=scale)
|
out = img.resize(scale=scale)
|
||||||
assert out.mode == mode
|
assert out.mode == mode
|
||||||
assert out.size == tuple(size)
|
assert out.size == tuple(size)
|
||||||
|
|
|
@ -2292,10 +2292,7 @@ class Image:
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
||||||
if scale:
|
if scale:
|
||||||
size = (
|
size = (int(self.width * scale), int(self.height * scale))
|
||||||
int(self.width * scale),
|
|
||||||
int(self.height * scale)
|
|
||||||
)
|
|
||||||
|
|
||||||
self.load()
|
self.load()
|
||||||
if box is None:
|
if box is None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user