mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-25 22:54:46 +03:00
updated Image
This commit is contained in:
parent
9dd0348be2
commit
425c59fdba
|
@ -1757,7 +1757,7 @@ class Image(object):
|
||||||
Returns a resized copy of this image.
|
Returns a resized copy of this image.
|
||||||
|
|
||||||
:param size: The requested size in pixels, as a 2-tuple:
|
:param size: The requested size in pixels, as a 2-tuple:
|
||||||
(width, height).
|
(width, height) or an int :(size,size)
|
||||||
:param resample: An optional resampling filter. This can be
|
:param resample: An optional resampling filter. This can be
|
||||||
one of :py:attr:`PIL.Image.NEAREST`, :py:attr:`PIL.Image.BOX`,
|
one of :py:attr:`PIL.Image.NEAREST`, :py:attr:`PIL.Image.BOX`,
|
||||||
:py:attr:`PIL.Image.BILINEAR`, :py:attr:`PIL.Image.HAMMING`,
|
:py:attr:`PIL.Image.BILINEAR`, :py:attr:`PIL.Image.HAMMING`,
|
||||||
|
@ -1777,6 +1777,9 @@ class Image(object):
|
||||||
):
|
):
|
||||||
raise ValueError("unknown resampling filter")
|
raise ValueError("unknown resampling filter")
|
||||||
|
|
||||||
|
if isinstance(size,int):
|
||||||
|
size = (size,size)
|
||||||
|
|
||||||
size = tuple(size)
|
size = tuple(size)
|
||||||
|
|
||||||
if box is None:
|
if box is None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user