cd /news/ai-policy/i-marked-a-png-for-the-eu-ai-act-the… · home › topics › ai-policy › article
[ARTICLE · art-173858] src=dev.to ↗ pub= topic=ai-policy verified=true sentiment=· neutral

I marked a PNG for the EU AI Act, then re-encoded it. The mark was gone.

A developer built a stdlib-only Python marker that embeds an XMP packet with the IPTC digital source type trainedAlgorithmicMedia into JPEG and PNG files, plus a sha256-bound JSON sidecar for formats that cannot safely hold metadata, to meet EU AI Act Article 50(2) machine-readable marking requirements. Testing on real files showed the embedded XMP mark survived read-back but was stripped by a routine CMS-style re-encode that dropped non-critical chunks, while the sidecar approach detected any single-byte change. The developer notes the marking transition runs to 2 December 2026 for systems placed on the market before 2 August 2026.

by read4 min views1 publishedNov 21, 2026

I spent last week on a problem that sounds small until you have to prove it in an audit. Article 50(2) of the EU AI Act requires providers of generative systems to mark synthetic audio, image, video and text outputs in a machine-readable format. Not a caption. Not a terms-of-service line. A mark a crawler or a downstream auditor can detect without reading prose.

The marking transition runs to 2 December 2026 for systems placed on the market before 2 August 2026. If you are on that list and you ship images, that is about eleven days away.

I wrote a small stdlib-only marker that embeds an XMP packet carrying the IPTC digital source type trainedAlgorithmicMedia - APP1 for JPEG, an iTXt chunk for PNG - and a sha256-bound sidecar for formats you cannot safely write metadata into. Then I ran the four checks that matter, on real files, and wrote the results down.

1. Mark a PNG, then read it back.

$ python marking.py mark src.png marked.png
MARKED src.png -> marked.png (887 bytes)
$ python marking.py verify marked.png
MARKED (embedded-xmp): marked.png   # exit 0

The mark is in the file, CRC-correct, and any XMP-aware tool can read it.

2. Re-encode the PNG the way a CMS would.

This is where it stopped being theoretical. I decoded the marked PNG and re-wrote it without the non-critical chunks - the same thing a thumbnailer, a CDN or a social platform does to an upload:

$ python marking.py verify reencoded.png
NOT MARKED (embedded-xmp): reencoded.png   # exit 1

The picture is identical. The mark is gone. A metadata mark is only as robust as the platform that carries it, and most platforms do not carry it. If your evidence plan is "we embedded XMP", the next question is "survived what?", and the honest answer is usually "nothing that re-encodes".

3. The sidecar path, and the tamper check.

For text, audio, video and anything you cannot write metadata into, the marker writes <file>.art50.json: the IPTC source type plus the file's sha256. That is a different property. It is not a mark in the file, it is a claim about the file, bound to its exact bytes.

$ python marking.py sidecar doc.txt
SIDECAR doc.txt.art50.json verify=True
$ python marking.py verify doc.txt
MARKED (sidecar): doc.txt   # exit 0
$ python marking.py verify doc.txt
NOT MARKED (sidecar): doc.txt   # exit 1

That is the check I would put in a pipeline. The sidecar tells you the file is the file you marked, and it tells you the instant it is not.

4. Re-marking does not stack.

Re-running the marker replaces the previous packet rather than appending a second one. It matters because a duplicated packet is the sort of thing that makes an auditor ask how many times this file passed through your pipeline. It is a small detail and it is acceptance-tested.

The article draws a line between two duty holders, and the two are not the same team:

If you wrap, fine-tune, host or resell a model, you are very likely a provider of the wrapped system even when the base model carries someone else's name. That is the planning error worth checking first, because it changes which duty lands on you.

verify. If the mark does not survive, that is a finding, not a detail. The first three are free and take an afternoon. The fourth is what an auditor asks for.

I maintain a small Art. 50(2) Marking Readiness Pack - the marker, a self-audit checklist mapped to the four statutory properties (effective, interoperable, robust, reliable) and a deployer disclosure template: https://derbaroser-eng.github.io/art50-marking/ (EUR 29).

If you need the operative wording of 50(1) to 50(5) next to the definitions, a provider/deployer duty map, the deadline table and an audit-trail template, I also produce a one-page Art. 50(2) Evidence Report for a specific pipeline: https://derbaroser-eng.github.io/art50-conform/ (EUR 490, one pipeline per report).

Both are engineering aids, not legal advice, and neither is a conformity certificate. Legal conclusions about your obligations stay with qualified counsel.

If you do one thing this week: run steps 1 and 2 on your own roadmap, then re-encode one of your own marked outputs and run verify. The result is worth more than the good intentions.

This post was drafted with AI assistance and reviewed by a human before publication.

── more in #ai-policy 4 stories · sorted by recency
── more on @eu 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-marked-a-png-for-t…] indexed:0 read:4min 2026-11-21 · —