If you have the current image as an rgb variable, just use:
rgba = numpy.concatenate((rgb, numpy.zeros((205, 54, 1))), axis=2)
A function union combines an array of rgb and zeros. The Zeros function creates an array of zeros. We set the axis to 2, which means we are merging in the dimensions of the tirade. Note: axis is counted from 0.
source share