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
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file max-contrast-0.0.2.tar.gz.
File metadata
- Download URL: max-contrast-0.0.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8d4225d57f16447666496a1e928ff2eb135af53cf21fe292f783c434d6524b7
|
|
| MD5 |
80664e8718eeee9c9ddbe8c13309d6e2
|
|
| BLAKE2b-256 |
6779de2da13426f6f985f82a0c6bcc92f9ced3291681f69590a5aae23fb5eef8
|
File details
Details for the file max_contrast-0.0.2-py3-none-any.whl.
File metadata
- Download URL: max_contrast-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
605e4d51f24bc192b7b2fc3cac06b6c8ecb8fa9bcbd0e2577ed22cba3e625b9e
|
|
| MD5 |
facc8268988239b7f8ec72f5bfc8dea0
|
|
| BLAKE2b-256 |
2ebc6cf8b3c9206fe05f69d8ee09c7ee3d3b99a3e11407eb8c637a54b98a6942
|