# 3. Then use the mask itself to fill that alpha channel
mask_rgba.putalpha(mask)