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

PNG keywords added by ExifTool aren't read correctly #91

Closed
pppaapp opened this issue Feb 1, 2021 · 6 comments
Closed

PNG keywords added by ExifTool aren't read correctly #91

pppaapp opened this issue Feb 1, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@pppaapp
Copy link

pppaapp commented Feb 1, 2021

No description provided.

@Webreaper Webreaper added the bug Something isn't working label Feb 1, 2021
@Webreaper
Copy link
Owner

Hi, can you give some more details of what the problem is here? PNG keywords should be updated so I'd like to know what's going wrong. Note that the keywords don't appear instantly on the image, so it might take a couple of minutes after adding for them to show up in the UI (fix pending for that: #59).

Can you confirm:

  1. Which version of Damselfly you're using
  2. What errors or messages you saw when adding the keyword

Can you also provide logs from the time it happened (these should be in the /config/logs folder for the docker container. If you're able to attach the image you were attempting to add keywords to, that would be helpful to debug too. :)

@Webreaper
Copy link
Owner

Done a bit more investigation on this. The keyword tags are, in fact, being written to the PNG file. However, when Damselfly re-scans the file during indexing to pick up the new keyword metadata, it doesn't read the keywords, because they don't appear to be available for PNG files with the metadata extractor that I'm using.

Tracking here: drewnoakes/metadata-extractor-dotnet#280

@Webreaper Webreaper changed the title Unable to modify png keyword PNG keywords added by ExifTool aren't read correctly Feb 2, 2021
@FewerFlaws
Copy link

While PNG files are capable of holding EXIF data by design, the specific implementation of that is not standardized. They have EXIF blocks where the data can be written and that's it. Therefore you can't expect two image metadata programs to interact nicely using PNG files unless they were specifically designed to be compatible with each other. There simply isn't a protocol. This is not a bug with Damselfly or ExifTool.

That being said, jpeg and webp do have standardized formats for EXIF data. If things are failing with those formats then there is a bug present.

@Webreaper
Copy link
Owner

Actually, that's not correct. It's perfectly possible to store ExifData in a PNG, and ExifTool does it just fine. If you use ExifTool to write keywords to a PNG, it can read them back, as can other apps (MacOS Preview, for example, and other image processing apps). The issue in Damselfly is that I use Drew Noakes' Metadata Extractor to read the Exif data from the files, and unfortunately it seems like there's a bug (or a missing feature) which means it's not reading the metadata from the PNG correctly. If you look at the bug report linked above, you'll see Drew and I discuss fixing it - I just haven't had a chance to debug it and submit a PR. :)

@FewerFlaws
Copy link

Whoops, I briefly glanced at this issue and should've read it more thoroughly. My apologies =]

@Webreaper
Copy link
Owner

Closed thanks to drewnoakes/metadata-extractor-dotnet#280 being closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants