Paul Coddington Posted June 3, 2024 Posted June 3, 2024 Keywords in the metadata pane are truncated to 64 characters, which is exhausted very quickly with hierarchical tags. Confirmed with PNG output. Not sure if this is a standards limitation or a bug. Have saved longer hierarchical tags in the past with other applications, but those were TIFF not PNG. Quote
- S - Posted June 3, 2024 Posted June 3, 2024 There is a limit in the IPTC specification to 64 bytes for Keywords. https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#keywords IIM Specs: 2:25 Keywords, max bytes for text: 64 https://www.iptc.org/std/IIM/4.2/specification/IIMV4.2.pdf (Page 32) 2:25 - Keywords Repeatable, maximum 64 octets, consisting of graphic characters plus spaces. When exporting to JPEG and TIFF file formats, the Keywords metadata is stored under both the IPTC "IPTC:Keywords" metadata tag and also the Dublin Core "XMP-dc:Subject" metadata tag. While the "XMP-dc:Subject" metadata tag is not limited to 64 bytes and isn't truncated, EXIF and IPTC metadata have a higher priority/hierarchy than XMP metadata. Therefore, when you open the image in Affinity Photo again, it will read the "IPTC:Keywords" metadata tag, not the "XMP-dc:Subject" metadata tag. "IPTC:Keywords" appears to be limited to 64 bytes per keyword (I.E. text between each comma or semicolon), rather than 64 bytes for the entire array. As can be seen below: Before exporting: Quote The quick brown fox jumped over the lazy dog that was fast asleep on the floor; The quick brown fox jumped over the lazy dog that was fast asleep on the floor; The quick brown fox jumped over the lazy dog that was fast asleep on the floor After exporting (truncated): Quote The quick brown fox jumped over the lazy dog that was fast aslee, The quick brown fox jumped over the lazy dog that was fast aslee, The quick brown fox jumped over the lazy dog that was fast aslee Therefore, ordinarily I would say the issue you're experiencing is possibly linked to above limitation in the IPTC specification. However, I do not understand why you are experiencing this issue with PNG files because when exporting to PNG file format, Affinity Photo only saves the Keyword metadata to "XMP-dc:Subject" – not "IPTC:Keywords". In addition, I am unable to reproduce your issue when exporting to PNG (either in the Affinity Photo Metadata panel, or when viewing the metadata with ExifTool). In order to try to reproduce what you're experiencing, are you able to post a set of keywords that you're able to reproduce the issue with and the steps to reproduce it? Perhaps upload a zipped PNG sample file as well. Screenshot A (Exporting from Affinity Photo as TIFF): Screenshot B (Exporting from Affinity Photo as JPEG): Quote
Paul Coddington Posted June 4, 2024 Author Posted June 4, 2024 13 hours ago, - S - said: Therefore, ordinarily I would say the issue you're experiencing is possibly linked to above limitation in the IPTC specification. However, I do not understand why you are experiencing this issue with PNG files because when exporting to PNG file format, Affinity Photo only saves the Keyword metadata to "XMP-dc:Subject" – not "IPTC:Keywords". In addition, I am unable to reproduce your issue when exporting to PNG (either in the Affinity Photo Metadata panel, or when viewing the metadata with ExifTool). I just tried it again and was initially a bit confused as to why it wasn't replicating. The missing part of the puzzle is that the PNG were being struck from a TIFF master and Affinity is truncating whenever changes to the TIFF is saved. Thanks for helping track that missing detail down. So, the problem is with TIFF, not PNG. Other details that have now become apparent: Windows Explorer writes tags to both XMP and IPTC fields identically, and does not observe the IPTC character limit (breaking the spec). Affinity imports IPTC fields without a character limit, but saves them with a character limit (observing the spec, but this means everything seems to be working fine until you later discover keywords were silently truncated). Raises the question, is IPTC taking priority over XMP an established standard, given it leads to data loss in cases where both XMP and ITPC exist? If this is the standard, should Affinity warn when a conflict is detected? Another question I need to follow up is whether ";" and "," preferences in keyword separation are cosmetic (app) or literal (file), and it is a bit tiresome having to swap between the two schemes on a per app basis. Commas are also potentially useful characters (eg: person names) which may make semicolons more desirable. I probably need to follow up on whether tagging supports escaped commas at some point. The main concern though is to not end up with a collection of images using mixtures of separators or with silently truncated keywords discovered long after backups have been overwritten. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.