patch : image copy

This commit is contained in:
Marco De Donno 2016-07-11 12:18:07 +02:00
parent 47ebf695ac
commit 8355a34c14

View File

@ -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: