mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50:54 +03:00
Document format limitations of ImageStat.Stat.extrema (#3661)
Document format limitations of ImageStat.Stat.extrema
This commit is contained in:
commit
c15dc4d7ca
|
@ -20,6 +20,13 @@ for a region of an image.
|
||||||
|
|
||||||
Min/max values for each band in the image.
|
Min/max values for each band in the image.
|
||||||
|
|
||||||
|
.. Note:: This relies on the :py:meth:`~PIL.Image.histogram` method, and simply
|
||||||
|
returns the low and high bins used. This is correct for images with 8 bits per
|
||||||
|
channel, but fails for other modes such as ``I`` or ``F``. Instead, use
|
||||||
|
:py:meth:`~PIL.Image.getextrema` to return per-band extrema for the image.
|
||||||
|
This is more correct and efficient because, for non-8-bit modes, the histogram
|
||||||
|
method uses :py:meth:`~PIL.Image.getextrema` to determine the bins used.
|
||||||
|
|
||||||
.. py:attribute:: count
|
.. py:attribute:: count
|
||||||
|
|
||||||
Total number of pixels for each band in the image.
|
Total number of pixels for each band in the image.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user