How to get alpha value of a PNG image with PIL?
To get the alpha layer of an RGBA image all you need to do is: red, green, blue, alpha = img.split() or alpha = img.split()[-1] And there is a method to set the alpha layer: img.putalpha(alpha) The transparency key is only used to define the transparency index in the palette mode (P). If you want … Read more