Answer the question
In order to leave comments, you need to log in
How to increase shades of red, green, blue in Pillow?
Can you please tell me how to increase or decrease the shades of red, green, blue in Pillow?
Answer the question
In order to leave comments, you need to log in
Any image with multiple channels can be divided into channels
. Then apply the Image.eval() method to them, something like this:
from PIL import Image
img = Image.open("путь к картинке")
channels = img.split()
channels[0] = Image.eval(
channels[0],
lambda x: min(x * 2, 255)
) # увеличиваем значение красного (0) в два раза
img = Image.merge(img.mode, channels)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question