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)
Example (Contrasting -100, Brightness 0)
Credits
Inspiration for the code has been taken from OpenPND: https://github.com/rivy/OpenPDN
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for max_contrast-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 605e4d51f24bc192b7b2fc3cac06b6c8ecb8fa9bcbd0e2577ed22cba3e625b9e |
|
MD5 | facc8268988239b7f8ec72f5bfc8dea0 |
|
BLAKE2b-256 | 2ebc6cf8b3c9206fe05f69d8ee09c7ee3d3b99a3e11407eb8c637a54b98a6942 |