()
| 95 | |
| 96 | |
| 97 | def 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( |