add omitted ImageFilter types

This commit is contained in:
nulano 2020-07-09 20:23:19 +02:00 committed by Andrew Murray
parent f6b4c3f741
commit 885ca9bb03
2 changed files with 27 additions and 1 deletions

View File

@ -66,3 +66,29 @@ image enhancement filters:
.. autoclass:: PIL.ImageFilter.ModeFilter .. autoclass:: PIL.ImageFilter.ModeFilter
:members: :members:
.. class:: Filter
An abstract mixin used for filtering images
(for use with :py:meth:`~PIL.Image.Image.filter`)
Implementors must provide the following method:
.. method:: filter(self, image)
Applies a filter to a single-band image, or a single band of an image.
:returns: A filtered copy of the image.
.. class:: MultibandFilter
An abstract mixin used for filtering multi-band images
(for use with :py:meth:`~PIL.Image.Image.filter`)
Implementors must provide the following method:
.. method:: filter(self, image)
Applies a filter to a multi-band image.
:returns: A filtered copy of the image.

View File

@ -124,7 +124,7 @@ This release contains several performance improvements:
* ``Image.transpose`` has been accelerated 15% or more by using a cache * ``Image.transpose`` has been accelerated 15% or more by using a cache
friendly algorithm. friendly algorithm.
* ImageFilters based on Kernel convolution are significantly faster * ImageFilters based on Kernel convolution are significantly faster
due to the new MultibandFilter feature. due to the new :py:class:`~PIL.ImageFilter.MultibandFilter` feature.
* All memory allocation for images is now done in blocks, rather than * All memory allocation for images is now done in blocks, rather than
falling back to an allocation for each scan line for images larger falling back to an allocation for each scan line for images larger
than the block size. than the block size.