Applying
img = Image.open("original.png").convert("L")
edited = ImageOps.autocontrast(img, cutoff=1, ignore=255, preserve_tone=True)
edited.save("autocontrast.png")
original.png
autocontrast.png
Expected result: White space above right stays white and is not black after applying ImageOps.autocontrast
-> any ideas what I do wrong?
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32 Pillow 8.4.0