KTX-Specification icon indicating copy to clipboard operation
KTX-Specification copied to clipboard

Support XMP metadata

Open lexaknyazev opened this issue 1 year ago • 3 comments

The current key-value storage is suitable for KTX-specific metadata entries but using it for storing generic information such as copyright and authorship is not practical. Common image formats (such as PNG and JPEG) support embedded XMP blocks that can provide interoperable metadata for integration with other systems.

An XMP block is either an XML or a JSON-LD document as defined in ISO 16684-1 or ISO 16684-3 respectively. Since it's text-based and may be quite verbose, zlib or zstd compression may be reasonable.

lexaknyazev avatar Apr 17 '24 18:04 lexaknyazev

Why do you say current key-value storage is not practical? Generically values can be nul-terminated utf-8 strings. Are XML and JSON-LD not utf-8?

Specifically what do you want to add to the spec?

MarkCallow avatar Apr 17 '24 23:04 MarkCallow

Here's the set of XMP fields used for attribution: https://developer.adobe.com/xmp/docs/XMPNamespaces/dc/. It's not practical to define mappings (sometimes non-trivial) from them to individual KTX* metadata keys.

The proposal is to add only one new metadata key, e.g., KTXxmp and its value would be a standard XMP payload. Tools then would be able to copy XMP data from PNG (and other sources) to KTX without much efforts.

lexaknyazev avatar Apr 18 '24 00:04 lexaknyazev

@lexaknyazev I see no problem adding KTXxmp. Please provide a PR.

MarkCallow avatar Aug 19 '24 03:08 MarkCallow