def METHOD_NAME(rgba):
    bit8 = rgba.dtype == np.uint8
    if not bit8:
        rgba = (rgba * 255.).astype(np.uint8)
    im = rgba_2_pil(rgba)
    data = pil_2_data(im)
    data = b64encode(data)
    if py3:
        data = data.decode("ascii")
    imgurl = "data:image/png;base64," + data + ""
    return imgurl