Write IPTC XMP into image style derivatives, which GD cannot do

Problem/motivation

Providers mark their output: OpenAI, Azure OpenAI, Google Vertex and Adobe sign C2PA, and many tools write the IPTC DigitalSourceType. GD derivatives strip all of it, and ImageMagick keeps only the XMP. Platforms read IPTC when an image is shared (Meta does). Article 50(2) marks cover all AI media, so this is for every AI grade, not only deep fakes.

Proposed resolution

A listener on the event from #64 (closed) writes an XMP packet into the derivative when its file resolves (#57 (closed)) to a grade with an IPTC URI:

  • Iptc4xmpExt:DigitalSourceType from the grade, and dc:description from the disclosure sentence.
  • Iptc4xmpExt:AISystemUsed and AISystemVersionUsed (IPTC Photo Metadata 2025.1) when the generator is known.
  • Never AIPromptInformation. The Code asks providers to keep privacy-sensitive data out of transparency metadata.
  • Pure PHP writers for JPEG (APP1), PNG (iTXt with keyword XML:com.adobe.xmp) and WebP (XMP chunk with the VP8X flag).
  • AVIF and HEIC through ExifTool when its path is configured. Otherwise skip, and say so on the status report.
  • On ImageMagick sites, replace the XMP that survived instead of adding a second packet.
  • The original upload is never touched.

Remaining tasks

  • XMP packet builder
  • Writers per format, with unit tests that read the packet back from fixture files
  • Listener and ExifTool fallback
  • Status report entry
  • Docs

User interface changes

An optional ExifTool path setting.

API changes

None.

Data model changes

None.

Part of #56 (closed).

Edited by Giorgio Alfredo Pagano