Fixed documentation on bilevel conversion

The cutoff when converting an image to bilevel (mode "1") is 128. This should resolve issue #3394.
This commit is contained in:
Erich Seifert 2018-10-05 01:11:24 +02:00 committed by GitHub
parent 3437d5fcb4
commit 9807f1ad56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -873,9 +873,9 @@ class Image(object):
The default method of converting a greyscale ("L") or "RGB" The default method of converting a greyscale ("L") or "RGB"
image into a bilevel (mode "1") image uses Floyd-Steinberg image into a bilevel (mode "1") image uses Floyd-Steinberg
dither to approximate the original image luminosity levels. If dither to approximate the original image luminosity levels. If
dither is NONE, all non-zero values are set to 255 (white). To dither is NONE, all values larger than 128 are set to 255 (white),
use other thresholds, use the :py:meth:`~PIL.Image.Image.point` all other values to 0 (black). To use other thresholds, use the
method. :py:meth:`~PIL.Image.Image.point` method.
When converting from "RGBA" to "P" without a **matrix** argument, When converting from "RGBA" to "P" without a **matrix** argument,
this passes the operation to :py:meth:`~PIL.Image.Image.quantize`, this passes the operation to :py:meth:`~PIL.Image.Image.quantize`,