r1 = scipy.misc.imread('red.png')
b1 = scipy.misc.imread('blue.png')
r1 = r1.astype(numpy.float32)
b1 = b1.astype(numpy.float32)
alpha1 = r1[:, :, (3)]
alpha2 = b1[:, :, (3)]
alpha1Scaled = alpha1 / 255
alpha2Scaled = alpha2 / 255
diff1 = alpha1Scaled - alpha2Scaled
i1 = r1[:, :, 0:3]
i2 = b1[:, :, 0:3]
d1 = numpy.zeros(i1.shape)
d2 = numpy.zeros(i2.shape)
for z in range(3):
    d1[:, :, (z)] = (diff1 >= 0) * diff1 * i1[:, :, (z)]
d2[:, :, (z)] = i2[:, :, (z)] * alpha2Scaled
result = d1 + d2
resultScaled = 255 * (result / result.max())
imshow(resultScaled.astype(uint8))
show()
figure()
imshow(red)
imshow(blue)
show()
PIL - Image Paste On Another Image With Alpha