mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 09:26:16 +03:00
patch : image copy
This commit is contained in:
parent
47ebf695ac
commit
8355a34c14
|
@ -190,7 +190,7 @@ def scale(image, factor, resample=Image.NEAREST):
|
|||
:returns: An :py:class:`~PIL.Image.Image` object.
|
||||
"""
|
||||
if factor == 1:
|
||||
return Image.Image._new(image.im)
|
||||
return image.copy()
|
||||
elif factor <= 0:
|
||||
raise ValueError("the factor must be greater than 0")
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user