Library which replicates the Paint.net contrast & brightness functionality in Python, allowing you to increase the contrast of an image until it turns B&W.
pip install max_contrast
from max_contrast import contrast_image
# contrast_image(image_path, brightness, contrast, save_path=False, show=False)
contrast_image("./example.png", 0, 100, "./example-contrasted.png")
Inspiration for the code has been taken from OpenPND: https://github.com/rivy/OpenPDN