add dither option for image processing (#796)

This commit is contained in:
San 2020-11-02 02:54:25 +08:00 committed by GitHub
parent fd92ada707
commit 9e85a68dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -338,6 +338,11 @@ Configuration variables:
- ``GREYSCALE``: Full scale grey. Uses 8 bits per pixel, 1 pixel per byte.
- ``RGB24``: Full RGB color stored. Uses 3 bytes per pixel.
- **dither** (*Optional*): Specifies which dither method used to process the image, only used in GREYSCALE and BINARY type image. Defaults to ``NONE``. You can read more about it `here <https://pillow.readthedocs.io/en/stable/reference/Image.html?highlight=Dither#PIL.Image.Image.convert>`__ and `here <https://en.wikipedia.org/wiki/Dither>`__.
- ``NONE``: Every pixel convert to its nearest color.
- ``FLOYDSTEINBERG``: Uses Floyd-Steinberg dither to approximate the original image luminosity levels.
.. note::
To use images you will need to have the python ``pillow`` package installed.