From 9cdfb296e5d862105b056812616b5ccb5c1ea233 Mon Sep 17 00:00:00 2001 From: essarrjay <67799040+essarrjay@users.noreply.github.com> Date: Wed, 5 Aug 2020 11:18:18 -0700 Subject: [PATCH 1/4] Image.thumbnail docstring: added Image.BOX filter [ci skip] updated docstring of Image.thumbnail to include Image.BOX filter as a resampling option. --- src/PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index db639f5248c..900583f3fa4 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2273,7 +2273,7 @@ def thumbnail(self, size, resample=BICUBIC, reducing_gap=2.0): :param size: Requested size. :param resample: Optional resampling filter. This can be one of :py:data:`PIL.Image.NEAREST`, :py:data:`PIL.Image.BILINEAR`, - :py:data:`PIL.Image.BICUBIC`, or :py:data:`PIL.Image.LANCZOS`. + :py:data:`PIL.Image.BICUBIC`, :py:data:`PIL.Image.BOX`, or :py:data:`PIL.Image.LANCZOS`. If omitted, it defaults to :py:data:`PIL.Image.BICUBIC`. (was :py:data:`PIL.Image.NEAREST` prior to version 2.5.0). See: :ref:`concept-filters`. From fce34a0d7b5349ce4b8229a7cab53433563cc4aa Mon Sep 17 00:00:00 2001 From: essarrjay <67799040+essarrjay@users.noreply.github.com> Date: Wed, 5 Aug 2020 12:11:22 -0700 Subject: [PATCH 2/4] Fixed line-length formatting Fixed line length issues in formatting [ci skip] --- src/PIL/Image.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 900583f3fa4..03c82895696 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2273,10 +2273,10 @@ def thumbnail(self, size, resample=BICUBIC, reducing_gap=2.0): :param size: Requested size. :param resample: Optional resampling filter. This can be one of :py:data:`PIL.Image.NEAREST`, :py:data:`PIL.Image.BILINEAR`, - :py:data:`PIL.Image.BICUBIC`, :py:data:`PIL.Image.BOX`, or :py:data:`PIL.Image.LANCZOS`. - If omitted, it defaults to :py:data:`PIL.Image.BICUBIC`. - (was :py:data:`PIL.Image.NEAREST` prior to version 2.5.0). - See: :ref:`concept-filters`. + :py:data:`PIL.Image.BICUBIC`, :py:data:`PIL.Image.BOX`, or + :py:data:`PIL.Image.LANCZOS`. If omitted, it defaults to + :py:data:`PIL.Image.BICUBIC`. (was :py:data:`PIL.Image.NEAREST` + prior to version 2.5.0). See: :ref:`concept-filters`. :param reducing_gap: Apply optimization by resizing the image in two steps. First, reducing the image by integer times using :py:meth:`~PIL.Image.Image.reduce` or From 70d868ef591f9fd8a1e2cb88d28766c21ea8b29c Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Sat, 15 Aug 2020 13:56:51 +1000 Subject: [PATCH 3/4] Lint fix Co-authored-by: Hugo van Kemenade --- src/PIL/Image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index 03c82895696..f7d4f3547df 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2273,8 +2273,8 @@ def thumbnail(self, size, resample=BICUBIC, reducing_gap=2.0): :param size: Requested size. :param resample: Optional resampling filter. This can be one of :py:data:`PIL.Image.NEAREST`, :py:data:`PIL.Image.BILINEAR`, - :py:data:`PIL.Image.BICUBIC`, :py:data:`PIL.Image.BOX`, or - :py:data:`PIL.Image.LANCZOS`. If omitted, it defaults to + :py:data:`PIL.Image.BICUBIC`, :py:data:`PIL.Image.BOX`, or + :py:data:`PIL.Image.LANCZOS`. If omitted, it defaults to :py:data:`PIL.Image.BICUBIC`. (was :py:data:`PIL.Image.NEAREST` prior to version 2.5.0). See: :ref:`concept-filters`. :param reducing_gap: Apply optimization by resizing the image From f9f492b2b1a78de3d687ef159231b966c258a8e9 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 27 Aug 2020 19:55:24 +1000 Subject: [PATCH 4/4] Added HAMMING to thumbnail docstring [ci skip] --- src/PIL/Image.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/PIL/Image.py b/src/PIL/Image.py index f7d4f3547df..db4e88f1050 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -2272,11 +2272,12 @@ def thumbnail(self, size, resample=BICUBIC, reducing_gap=2.0): :param size: Requested size. :param resample: Optional resampling filter. This can be one - of :py:data:`PIL.Image.NEAREST`, :py:data:`PIL.Image.BILINEAR`, - :py:data:`PIL.Image.BICUBIC`, :py:data:`PIL.Image.BOX`, or - :py:data:`PIL.Image.LANCZOS`. If omitted, it defaults to - :py:data:`PIL.Image.BICUBIC`. (was :py:data:`PIL.Image.NEAREST` - prior to version 2.5.0). See: :ref:`concept-filters`. + of :py:data:`PIL.Image.NEAREST`, :py:data:`PIL.Image.BOX`, + :py:data:`PIL.Image.BILINEAR`, :py:data:`PIL.Image.HAMMING`, + :py:data:`PIL.Image.BICUBIC` or :py:data:`PIL.Image.LANCZOS`. + If omitted, it defaults to :py:data:`PIL.Image.BICUBIC`. + (was :py:data:`PIL.Image.NEAREST` prior to version 2.5.0). + See: :ref:`concept-filters`. :param reducing_gap: Apply optimization by resizing the image in two steps. First, reducing the image by integer times using :py:meth:`~PIL.Image.Image.reduce` or