Closed reinfallt closed 2 years ago
The latest fixes in my branch now makes this file work. I think the code looks a bit messy though so I don't know if I should do a pull request or do some refactoring first. It would probably be good to refactor the XmpReader to be able to call it directly instead of having to do a if/else on the different xmp preambles in the PngMetadataReader.
Feel free to create a PR. It'll make discussing the change easier.
Here is another weird png file: https://drive.google.com/file/d/1mKhXLAafXUb0C6OXrtQtNwRPNVyXlJNn/view?usp=sharing
The parsing mainly has two issues:
The keyword for the exif text chunk is "Raw profile type EXIF" instead of "Raw profile type exif". This can be easily fixed by either making the comparison case insensitive or just compare against the other one explicitly.
The text chunk with keyword "Raw profile type APP1" actually contains XMP data and not exif data. I did some experiments trying to get it to work (https://github.com/reinfallt/metadata-extractor-dotnet/tree/png_xmp_in_app1_chunk) but I still get an "Error processing XMP data: Unsupported Encoding" from the actual XMP parsing. I didn't debug into the XMP parsing to see what goes wrong.