PIL corrupt png images with transparency if i make them grayscale. Why?
Here's my code:
input = Image.open('input.png')
output = ImageOps.grayscale(input)
output.save('output.png', **input.info)
Input
Output
is there a way to fix that?
You can use convert
method with luminance trick:
Image.open('input.png').convert('LA').save('output.png')