mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-06 14:40:51 +03:00
Filters comparison table
This commit is contained in:
parent
4414d58334
commit
fc448ddbdf
|
@ -87,6 +87,8 @@ the file format handler (see the chapter on :ref:`image-file-formats`). Most
|
||||||
handlers add properties to the :py:attr:`~PIL.Image.Image.info` attribute when
|
handlers add properties to the :py:attr:`~PIL.Image.Image.info` attribute when
|
||||||
loading an image, but ignore it when saving images.
|
loading an image, but ignore it when saving images.
|
||||||
|
|
||||||
|
.. _concept-filters:
|
||||||
|
|
||||||
Filters
|
Filters
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@ -110,8 +112,25 @@ pixel, the Python Imaging Library provides four different resampling *filters*.
|
||||||
|
|
||||||
``LANCZOS``
|
``LANCZOS``
|
||||||
Calculate the output pixel value using a high-quality Lanczos filter (a
|
Calculate the output pixel value using a high-quality Lanczos filter (a
|
||||||
truncated sinc) on all pixels that may contribute to the output value. In
|
truncated sinc) on all pixels that may contribute to the output value.
|
||||||
the current version of PIL, this filter can only be used with the resize
|
This filter can only be used with the :py:meth:`~PIL.Image.Image.resize`
|
||||||
and thumbnail methods.
|
and :py:meth:`~PIL.Image.Image.thumbnail` methods.
|
||||||
|
|
||||||
.. versionadded:: 1.1.3
|
.. versionadded:: 1.1.3
|
||||||
|
|
||||||
|
|
||||||
|
Filters comparison table
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
+------------+-------------+-----------+-------------+
|
||||||
|
| Filter | Downscaling | Upscaling | Performance |
|
||||||
|
| | quality | quality | |
|
||||||
|
+============+=============+===========+=============+
|
||||||
|
|``NEAREST`` | | | ⭐⭐⭐⭐⭐ |
|
||||||
|
+------------+-------------+-----------+-------------+
|
||||||
|
|``BILINEAR``| ⭐ | ⭐ | ⭐⭐⭐ |
|
||||||
|
+------------+-------------+-----------+-------------+
|
||||||
|
|``BICUBIC`` | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ |
|
||||||
|
+------------+-------------+-----------+-------------+
|
||||||
|
|``LANCZOS`` | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐ |
|
||||||
|
+------------+-------------+-----------+-------------+
|
||||||
|
|
Loading…
Reference in New Issue
Block a user