From 34029e9af4112c4e0ceca555b5755937f0bb0034 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 30 Dec 2019 03:23:30 +0300 Subject: [PATCH] texts fixes --- docs/releasenotes/7.0.0.rst | 4 ++-- src/PIL/Image.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/releasenotes/7.0.0.rst b/docs/releasenotes/7.0.0.rst index ae652278d..4abc216df 100644 --- a/docs/releasenotes/7.0.0.rst +++ b/docs/releasenotes/7.0.0.rst @@ -111,13 +111,13 @@ In addition, the same gap is applied when :py:meth:`~PIL.Image.Image.thumbnail` calls :py:meth:`~PIL.Image.Image.draft`, which may greatly improve the quality of JPEG thumbnails. As a result, :py:meth:`~PIL.Image.Image.thumbnail` in the new version provides equally high speed and high quality from any -sources (JPEG or arbitrary images). +source (JPEG or arbitrary images). New Image.reduce() method ^^^^^^^^^^^^^^^^^^^^^^^^^ :py:meth:`~PIL.Image.Image.reduce` is a highly efficient operation -to reduce an image by integer times. Normally, shouldn't be used directly. +to reduce an image by integer times. Normally, it shouldn't be used directly. Used internally by :py:meth:`~PIL.Image.Image.resize` and :py:meth:`~PIL.Image.Image.thumbnail` methods to speed up resize when a new argument ``reducing_gap`` is set. diff --git a/src/PIL/Image.py b/src/PIL/Image.py index a48c111fc..985cc21de 100644 --- a/src/PIL/Image.py +++ b/src/PIL/Image.py @@ -1810,7 +1810,7 @@ class Image: or should be greater than 1.0. The bigger ``reducing_gap``, the closer the result to the fair resampling. The smaller ``reducing_gap``, the faster resizing. - With ``reducing_gap`` greater or equal to 3.0 result is + With ``reducing_gap`` greater or equal to 3.0, the result is indistinguishable from fair resampling in most cases. The default value is None (no optimization). :returns: An :py:class:`~PIL.Image.Image` object. @@ -1835,7 +1835,7 @@ class Image: ) if reducing_gap is not None and reducing_gap < 1.0: - raise ValueError("reducing_gap could not be less than 1.0") + raise ValueError("reducing_gap must be 1.0 or greater") size = tuple(size) @@ -2221,11 +2221,11 @@ class Image: :py:meth:`~PIL.Image.Image.draft` for JPEG images. Second, resizing using regular resampling. The last step changes size no less than by ``reducing_gap`` times. - ``reducing_gap`` may be none (no first step is performed) + ``reducing_gap`` may be None (no first step is performed) or should be greater than 1.0. The bigger ``reducing_gap``, the closer the result to the fair resampling. The smaller ``reducing_gap``, the faster resizing. - With ``reducing_gap`` greater or equal to 3.0 result is + With ``reducing_gap`` greater or equal to 3.0, the result is indistinguishable from fair resampling in most cases. The default value is 2.0 (very close to fair resampling while still being faster in many cases).