A very simple program using PIL to extract the png text embedded as metadata by comfyUI
import PIL.Image
import argparse
def extract_text(filename):
png = PIL.Image.open(filename)
return png.text
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='png metadata infor')
parser.add_argument('filename', help='png File to check')
args = parser.parse_args()
text = extract_text(args.filename)
print(text)
No comments:
Post a Comment