def do_background(img, background):
    if not background:
        return img

    overlay = img

    fill_color = (
        int("0x%s" % background[0:2], 16),
        int("0x%s" % background[2:4], 16),
        int("0x%s" % background[4:6], 16),
        int("0x%s" % background[6:8], 16),
    )
    img = pil.new("RGBA", overlay.size, fill_color)

    iw, ih = img.size
    ow, oh = overlay.size

    #img.paste(overlay, (int((iw - ow) / 2), int((ih - oh) / 2)), overlay)
    do_paste(img, overlay, (int((iw - ow) / 2), int((ih - oh) / 2)))

    return img
dataset/ETHPy150Open francescortiz/image/image/utils.py/do_background/original