Skip to main content

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.

Project description

max-contrast

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.

Usage

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")

Example (Contrasting 100, Brightness 0)

No filters applied Contrasting 100

Example (Contrasting -100, Brightness 0)

No filters applied Contrasting 100

Credits

Inspiration for the code has been taken from OpenPND: https://github.com/rivy/OpenPDN

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

max-contrast-0.0.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

max_contrast-0.0.2-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page