import base64


def PngFile_to_Base64(file_name):
    """Converts a png file to a base 64 encoded string"""
    in_file=open(file_name, "rb")
    encoded=base64.b64encode(in_file.read()).decode()
    return encoded