Document Image.quantize "method" defaults#5251
Document Image.quantize "method" defaults#5251gofr wants to merge 2 commits intopython-pillow:masterfrom gofr:document-quantize-default
Conversation
The method uses different defaults for different image modes.
src/PIL/Image.py
Outdated
| :param method: :data:`MEDIANCUT` (default), | ||
| :data:`MAXCOVERAGE`, | ||
| :data:`FASTOCTREE` (default for RGBA images), | ||
| :data:`LIBIMAGEQUANT`. |
There was a problem hiding this comment.
Why remove the mention of PIL.features.check_feature(feature="libimagequant")?
There was a problem hiding this comment.
Because in the online documentation these methods link to https://pillow.readthedocs.io/en/stable/reference/Image.html#quantization-methods which already mentions exactly what it said here. I thought it would be better not to duplicate information.
I've added another commit to remove even more here and make this link to the existing section instead.
There was a problem hiding this comment.
@nulano can you have another look? Are you ok with my changes here?
All quantization methods are already documented in a dedicated section. Don't duplicate that information in the documentation of Image.quantize(). Link to the existing section.
|
I've created #5352 as an alternative. It has the same information as yours, just arranged differently. |
The method uses different defaults for different image modes.
Relates to issue #5217. Maybe enough to fix it, since I think it's just expected behavior that's not documented well enough.
And um, confusing use of the word "method" in the commit message. I mean the
methodparameter to theImage.quantizefunction.