# c2pa_xmp_probe

Scan JPG/PNG/WebP (or any file) for byte-level C2PA, XMP, and common AI provenance markers before you upload to Instagram, TikTok, or similar.

This is a local probe only. It does not rewrite files.

## Install

```elixir
def deps do
  [
    {:c2pa_xmp_probe, "~> 0.1.0"}
  ]
end
```

Or build a local CLI:

```bash
mix escript.build
./c2pa-xmp-probe photo.jpg
```

## Usage

```bash
c2pa-xmp-probe photo.jpg
c2pa-xmp-probe --json export.png still.webp
```

```elixir
{:ok, result} = C2paXmpProbe.probe_file("export.jpg")

if C2paXmpProbe.flagged?(result) do
  IO.inspect(result.matched)
end
```

Exit codes: `0` = no markers, `1` = flagged, `2` = missing path / IO error.

If markers show up, keep the archive master and export a separate social copy. An [Elixir-friendly pre-upload stills cleaner](https://removeailabel.com) can strip C2PA/XMP in the browser on that copy only — then post the cleaned JPEG.

## License

MIT
