Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question/Feature request: PNG metadata for ML-created images. #4

Open
Hotcooler opened this issue Oct 25, 2022 · 2 comments
Open

Question/Feature request: PNG metadata for ML-created images. #4

Hotcooler opened this issue Oct 25, 2022 · 2 comments

Comments

@Hotcooler
Copy link

Hotcooler commented Oct 25, 2022

First of all thanks for this great project, since it's indeed incredibly hard to find anything for a ready-to-go image display site, with basically a dump directory interface. So it's a godsend that this project exists.

A bit of pretext, I've recently got a new GPU, and... got into messing about with Stable Diffusion, and was becoming a bother to friends on messengers sending them pics ;) So I kinda thought a small simple gallery site that just displays what is dumped into a directory with some simple modify-date sort must be easy to come by :) Apparently it aint haha.

As a fellow connoisseur of AI generated imagery, it would be rather cool to add the ability to display creation parameters when viewing in full screen under the picture. SD saves it's image generation parameters in a tEXt field inside a PNG with a key=parameters.

As I imagine I might not be the only one looking at this project to display ML images to friends, it might be a cool addition. Plus probably the same can be used for displaying relevant (date, place e.t.c.) EXIF for your wedding photos too :)

@Inlustra
Copy link
Owner

So I just looked into this, this data isn't in the EXIF as you've mentioned, but I can't see exactly how to get this tEXt field do you have any docs on it I can look at?

That being said, I don't have lots of time to spend on this and I don't think I can commit to writing any image file processing.

We do already pull the EXIF, but from my brief attempts at least, I don't see it in there.

@Hotcooler
Copy link
Author

Hotcooler commented Oct 25, 2022

Yeah it's not a priority for sure, it's just a if you have time/want for this "nice to have".

It's not EXIF, but I imagine libraries that do pull EXIF can also do png metadata fields. Here's a description from EXIV2 - https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_PNG_files

I figured IMAGOR might already be able to extract that data (though afaik only EXIF is mentioned). Tested, Exiftool can get that, imagemagik's identify can do it, pngcheck -7 too, exiv2 from ubuntu repo - cannot.

I'll attach an image to look at.
00002-3232408443-photo of 8k u
Here's what it looks like inside, basically plain text after the header.
Clipboard02
Clipboard03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants