MCPcopy
hub / github.com/python-pillow/Pillow / test_quantize_dither_diff

Function test_quantize_dither_diff

Tests/test_image_quantize.py:97–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95
96
97def test_quantize_dither_diff() -> None:
98 image = hopper()
99 with Image.open("Tests/images/caption_6_33_22.png") as palette:
100 palette_p = palette.convert("P")
101
102 dither = image.quantize(dither=Image.Dither.FLOYDSTEINBERG, palette=palette_p)
103 nodither = image.quantize(dither=Image.Dither.NONE, palette=palette_p)
104
105 assert dither.tobytes() != nodither.tobytes()
106
107
108@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 5

hopperFunction · 0.85
convertMethod · 0.80
quantizeMethod · 0.80
openMethod · 0.45
tobytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…