(imagePath)
图片转base64
    :param image_path: 图片地址
    :return: base64
图片转base64
    :param image_path: 图片地址
    :return: base64
图片转base64 : param image_path : 图片地址 : return : base64
def image2base64(imagePath):
    '''
    图片转base64
    :param image_path: 图片地址
    :return: base64
    '''
    with open(imagePath, 'rb') as f:
        base64_data = base64.b64encode(f.read())
        s = base64_data.decode()
        return s
def image2base64 ( imagePath ) : with open ( imagePath , 'rb' ) as f : base64_data = base64 . b64encode ( f . read ( ) ) s = base64_data . decode ( ) return s