Hi!
I think you can use the PIL Image API to apply transformations to your image.
If you opened the image with PIL then you can use the Image.convert() method as seen in the docs 1 to convert RGBA to a single channel.
I haven’t tested the below snippet but I think it may work. Give it a try  I got the modes from here 2.
from PIL import Image
img = Image.open('myrgba.png').convert(mode='RGBA')