Skip to content

Commit

Permalink
Changed quantize default dither to FLOYDSTEINBERG
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 18, 2022
1 parent 5dd0a5e commit 6580d9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PIL/Image.py
Expand Up @@ -1061,7 +1061,9 @@ def convert_transparency(m, v):
new_im.info["transparency"] = trns
return new_im

def quantize(self, colors=256, method=None, kmeans=0, palette=None, dither=1):
def quantize(
self, colors=256, method=None, kmeans=0, palette=None, dither=FLOYDSTEINBERG
):
"""
Convert the image to 'P' mode with the specified number
of colors.
Expand All @@ -1085,7 +1087,6 @@ def quantize(self, colors=256, method=None, kmeans=0, palette=None, dither=1):
:param dither: Dithering method, used when converting from
mode "RGB" to "P" or from "RGB" or "L" to "1".
Available methods are :data:`NONE` or :data:`FLOYDSTEINBERG` (default).
Default: 1 (legacy setting)
:returns: A new image
"""
Expand Down

0 comments on commit 6580d9a

Please sign in to comment.