mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 09:26:16 +03:00
add filters to concepts
This commit is contained in:
parent
66715246c1
commit
41f03a05e5
|
@ -96,7 +96,16 @@ For geometry operations that may map multiple input pixels to a single output
|
|||
pixel, the Python Imaging Library provides four different resampling *filters*.
|
||||
|
||||
``NEAREST``
|
||||
Pick the nearest pixel from the input image. Ignore all other input pixels.
|
||||
Pick one nearest pixel from the input image. Ignore all other input pixels.
|
||||
|
||||
``BOX``
|
||||
Each pixel of source image contributes to one pixel of the
|
||||
destination image with identical weights.
|
||||
For upscaling is equivalent of ``NEAREST``.
|
||||
This filter can only be used with the :py:meth:`~PIL.Image.Image.resize`
|
||||
and :py:meth:`~PIL.Image.Image.thumbnail` methods.
|
||||
|
||||
.. versionadded:: 3.4.0
|
||||
|
||||
``BILINEAR``
|
||||
For resize calculate the output pixel value using linear interpolation
|
||||
|
@ -104,6 +113,14 @@ pixel, the Python Imaging Library provides four different resampling *filters*.
|
|||
For other transformations linear interpolation over a 2x2 environment
|
||||
in the input image is used.
|
||||
|
||||
``HAMMING``
|
||||
Produces more sharp image than ``BILINEAR``, doesn't have dislocations
|
||||
on local level like with ``BOX``.
|
||||
This filter can only be used with the :py:meth:`~PIL.Image.Image.resize`
|
||||
and :py:meth:`~PIL.Image.Image.thumbnail` methods.
|
||||
|
||||
.. versionadded:: 3.4.0
|
||||
|
||||
``BICUBIC``
|
||||
For resize calculate the output pixel value using cubic interpolation
|
||||
on all pixels that may contribute to the output value.
|
||||
|
@ -128,8 +145,12 @@ Filters comparison table
|
|||
+============+=============+===========+=============+
|
||||
|``NEAREST`` | | | ⭐⭐⭐⭐⭐ |
|
||||
+------------+-------------+-----------+-------------+
|
||||
|``BOX`` | ⭐ | | ⭐⭐⭐⭐ |
|
||||
+------------+-------------+-----------+-------------+
|
||||
|``BILINEAR``| ⭐ | ⭐ | ⭐⭐⭐ |
|
||||
+------------+-------------+-----------+-------------+
|
||||
|``HAMMING`` | ⭐⭐ | | ⭐⭐⭐ |
|
||||
+------------+-------------+-----------+-------------+
|
||||
|``BICUBIC`` | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ |
|
||||
+------------+-------------+-----------+-------------+
|
||||
|``LANCZOS`` | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐ |
|
||||
|
|
Loading…
Reference in New Issue
Block a user