Metadata Write-Back Fail

Started by Darius1968, November 14, 2021, 01:18:12 AM

Previous topic - Next topic

Darius1968

The attached .zip file contains a .jpg, for which, a metadata write-back fails, repeatedly.  I ran the MDA app, on this file, and the results are made available - via the .txt file (also, attached, here) - for your reference. 
Thanks, for evaluating the problem, and telling me, how to treat this file, so that I can, successfully, complete the write-back. 

Mario

Re-save the JPG an an image editor, then retry.
If ExifTool fails to write metadata to an image the data is usually corrupted and non-standard and the only way to "fix" it is to remove it entirely or to rewrite the image fresh.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

I have seen, some other posts, here, wherein, the user(s) had very closely, related problems, as I do.  Suggested remedies involved the ECP - deleting XMP and/or IPTC metadata, or other 'custom' codes, to run, in the hopes of fixing the problem.  I tried some of those, and for me, they didn't help.  Does the MDA show anything unique, about this particular image, that precludes the ECP, from participating, in the fix? 
Yeah, I could just re-save the photo, which might work, but is there an alternative, which would re-save, just the metadata, and not the image data (to avoid .jpg re-save degradation)?  Is there a way, in IMatch, to purify the metadata, thus getting corruptions out? 

Mario

The only problem I see with this file is that the IPTC keywords are not matching the XMP keywords AND that there are two separate (!) XMP:subject elements. Very unusual.

I made a copy of the file and stripped the old legacy IPTC data with

exiftool -overwrite_original -iptc:all= FileName.jpg

I then added the file to IMatch. IMatch showed the file as pending (XMP:dc-Subject). I could write back without any problems.
This produced two XMP subject records again.
Something with the structure of the JPG is fishy but analyzing this further would be too expensive.

I resaved it in Photoshop and all is well. Metadata still in the file etc.
Added a keyword and rating. Write back. All well. Keywords in sync etc.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

Is it possible, to re-save, in Photoshop, in a mode, which doesn't touch the image data; Just the metadata? 

Mario

Nope.

You can try to extract the metadata to a file with ExifTool, delete the metadata in the file, re-import the metadata from the file.
I'm sure how to do this has been asked and answered many times on the web.
The problem is that this will not solve the out-of-sync IPTC keywords, the duplicate (!) XMP::dc-Subject etc.
It's just not worth the time to dig into this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook