Reputation: 1
I want to make a filter to change the clarity of the image, but no matter what I searched, I could not find any function or algorithm for this.
Upvotes: 0
Views: 335
Reputation: 5721
In your terminal, execute this command: pip install Pillow
from PIL import Image, ImageEnhance
# Read the image
img = Image.open("your-image-path-here.png")
# Image brightness enhancer
enhancer = ImageEnhance.Brightness(img)
factor = 1.3 # Change the value here to change the brightness
img_output = enhancer.enhance(factor)
img_output.save('my-modified-image.png') # You can name "my-modified-image" whatever you want.
Upvotes: 0