Alternatively, how can I simulate this Photoshop affect programmatically?
In Photoshop, I have two layers:
A simple "Magenta" fill, with blend mode Multiply, and Opacity 100%
And a simple "Cyan" fill, with blend mode Multiply, and Opacity 50%
Which looks like this at 100% Opacity btw
The result is a nice 100% opacity purple:
I tried to do what I thought would be the same thing with Pillow:
from PIL import Image, ImageChops
path = './static/images/'
cyan = Image.open(path+'Cyan.png')
magenta = Image.open(path+'Magenta.png')
# set cyan to 50% opacity
cyan.putalpha(127)
# set magenta to 100% opacity
magenta.putalpha(255)
# blend mode multiply??
blend = ImageChops.multiply(magenta, cyan)
blend.save(path+'blend.png')
but the result is this:
Which, in Photoshop, this is what i get if I set BOTH Magenta and Cyan to 50%.
So, what is ImageChops doing differently from Photoshop here? and how can I do what I did in Photoshop.. but in Python? Is there a way to multiply blend two images but to take the higher opacity instead of the lower? Or should I be using some other method entirely?