|
I have some code that uses pillow to read in the metadata added by Comfyui to a PNG file. And that works fine. I'm guessing the issue is there is multiple metadata in the PNG file, and the "chromaticity" is taking precedence. If that is the case, is there any way to tell Pillow to look for alternative metadata, or return all possible metadata ? Thank ps I have tried alternatives, and none of them have worked (pypng and piexif) |
Replies: 4 comments 2 replies
|
Could you attach a copy of the ComfyUI image, and a copy of the ImageMagick image? Ideally, it would also be helpful if you could provide a simple example of Pillow code reading the metadata from the ComfyUI image. |
|
my code: image = PILImage.open(filename)
metadata = image.infoexiftool ComfyUI_04525_ - https://github.com/user-attachments/assets/fd340680-7a10-4621-b455-efc12056a2ca |
from PIL import Image
im = Image.open("comfy.png")
im.load()
for k, v in im.info.items():
print(k+": "+str(v)[:100])will give you Is that all you were after? |
|
Thank you so much, that's 100% what I was looking for. simply using image0 = PILImage.open(filename)
mtext = image0.textworked |
will give you
Is that all you were after?