| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Fixes python-pillow#5836. dither was silently ignored whenever no reference palette was given, since the underlying quantize() has no dither support without one. Now re-converts through the computed palette when dithering is explicitly requested.
| Back | FazBrowse Home | New Git URL |
Fixes #5836.
dither was silently ignored whenever no reference palette was given (e.g. im.convert("P", palette=Image.Palette.ADAPTIVE, dither=...) or plain im.quantize(dither=...)), because the underlying self.im.quantize() C call has no dithering support without an explicit reference palette. This re-converts through the computed adaptive palette when dithering is explicitly requested, so dither is honored in both convert() and quantize(). Calls that don't pass dither are unaffected.
Changes proposed in this pull request: