human
How to get alpha value of a PNG image with PIL?
assistant
Here is some code to get alpha value `alpha` of a png image `img`

alpha = img.split()[-1]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.