(base64str)
base64转图片
    :param base64str: base64
base64转图片
    :param base64str: base64
base64转图片 : param base64str : base64
def base642image(base64str):
    '''
    base64转图片
    :param base64str: base64
    '''
    imgdata = base64.b64decode(base64str)
    with open('换脸后路径', 'wb') as f:
        f.write(imgdata)
    print('successful')
def base642image ( base64str ) : imgdata = base64 . b64decode ( base64str ) with open ( '换脸后路径', 'wb') as : f . write ( imgdata ) print ( 'successful' )