photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Darius1968 on November 14, 2021, 01:18:12 AM

Title: Metadata Write-Back Fail
Post by: Darius1968 on November 14, 2021, 01:18:12 AM
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. 
Title: Re: Metadata Write-Back Fail
Post by: Mario on November 14, 2021, 01:13:41 PM
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.
Title: Re: Metadata Write-Back Fail
Post by: Darius1968 on November 14, 2021, 05:43:42 PM
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? 
Title: Re: Metadata Write-Back Fail
Post by: Mario on November 14, 2021, 06:44:29 PM
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.

Title: Re: Metadata Write-Back Fail
Post by: Darius1968 on November 14, 2021, 07:52:11 PM
Is it possible, to re-save, in Photoshop, in a mode, which doesn't touch the image data; Just the metadata? 
Title: Re: Metadata Write-Back Fail
Post by: Mario on November 14, 2021, 08:06:53 PM
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.