跳到正文
DEV Community· Noah Keller·· 4 小時前AI 評分57

SynthID 移除與中繼資料有何分別?解讀 AI 圖像檔案中的 EXIF、XMP、C2PA

SynthID remove vs. metadata: what's actually inside an AI image file (EXIF, XMP, C2PA)

AI 導讀

AI 圖像檔案的 EXIF、XMP、IPTC、C2PA 等嵌入式中繼資料,與像素級 SynthID 水印屬於不同層次,清除中繼資料不會移除水印。作者介紹用 exiftool 檢查資料,以及透過 Canvas API 在瀏覽器本機重新編碼以清除原有中繼資料;JPEG 重新編碼可能有損,色彩設定檔亦可能改變。移除中繼資料不能取代平台或客戶要求的 AI 揭露。

正文

If you've ever downloaded an image from an AI generator and opened it in exiftool, you've probably noticed the file carries a lot more than pixels. Generators, editors and even some phones now write provenance data into the file: software names, prompts, creation tools and, increasingly, signed C2PA manifests. A lot of the "synthid remove" searches I see from photographers and indie devs are really about this layer, so it's worth separating the two things clearly.

Two different things: embedded metadata vs. pixel watermarks

Embedded metadata lives in containers alongside the image data:

  • EXIF: camera/software fields, timestamps, sometimes GPS.
  • XMP: an XML packet. Many AI tools write fields like CreatorTool or IPTC's DigitalSourceType (e.g. trainedAlgorithmicMedia) here.
  • IPTC: older newsroom-style captions, credits and keywords.
  • C2PA / Content Credentials: a signed manifest (stored in JUMBF boxes) describing how the asset was made and edited.
  • PNG text chunks (tEXt, iTXt): some local Stable Diffusion UIs store the full prompt and settings here.

Pixel-level watermarks such as Google's SynthID are different: they're woven into the image content itself, so stripping metadata does nothing to them. Keep that distinction in mind when someone promises a one-click fix for both.

Why you might legitimately want a clean copy

There are plenty of honest reasons to strip metadata from images you own or are authorized to edit:

  • Removing GPS coordinates and device info before posting personal photos.
  • Not leaking an entire prompt or internal file paths in a product screenshot.
  • Shrinking file size by dropping large XMP packets.
  • Normalizing assets for a website build.

What it is not for: passing off generated images as camera photos where a platform, client or publication requires disclosure. If the rules say "label AI images", label them, in the caption or alt text, regardless of what's in the file.

Inspecting a file first

Before removing anything, look at what's there:

exiftool -a -G1 image.png        # every tag, grouped by container
exiftool -XMP:all image.jpg      # just the XMP packet
c2patool image.jpg               # C2PA manifest, if any

For a PNG from a local SD install you'll often see a parameters text chunk containing the whole prompt.

Doing it in the browser, without uploading

You can do the cleanup locally with the Canvas API: draw the decoded image to a canvas and export a fresh blob. The re-encoded file contains pixels only, none of the original EXIF/XMP/IPTC/C2PA/text chunks.

async function cleanCopy(file, type = file.type) {
  const bitmap = await createImageBitmap(file);
  const canvas = new OffscreenCanvas(bitmap.width, bitmap.height);
  canvas.getContext('2d').drawImage(bitmap, 0, 0);
  return canvas.convertToBlob({ type, quality: 0.95 });
}

Caveats: JPEG re-encoding is lossy, color profiles may change, and orientation metadata is applied before drawing in modern browsers, so check the result.

If you don't want to wire that up yourself, the free Remove AI Label tool on SynthClear does exactly this kind of local cleanup: you drop in JPG, PNG or WEBP files and it creates fresh copies without the original EXIF, XMP, C2PA and other embedded metadata, processed in your browser rather than uploaded.

SynthClear Remove AI Label tool - free in-browser EXIF XMP C2PA metadata remover
The free Remove AI Label page on SynthClear (screenshot).

What about SynthID?

Since SynthID isn't metadata, the browser trick above won't touch it. SynthClear also has a separate, paid tool on its homepage that attempts to remove supported SynthID watermarks from images you own or are authorized to edit; the site itself says results vary by image and aren't guaranteed. I'd treat that as a niche tool for your own assets, not a way around disclosure rules.

SynthClear homepage - SynthID remove tool for images you own
SynthClear's homepage, where the separate SynthID tool lives (screenshot).

A quick checklist

  1. Inspect with exiftool -a -G1 so you know what you're removing.
  2. Strip only from images you own or have rights to edit.
  3. Keep an original with its provenance intact for your records.
  4. Disclose AI involvement wherever the platform or client asks, in visible text.
  5. Re-check the output; confirm GPS and prompts are really gone.

For more background, see this guide on SynthID remove vs. metadata and disclosure for photographers and this short publishing checklist for AI images.

Metadata is useful, and sometimes it says more than you meant to share. Knowing which layer you're dealing with is most of the battle.

來源:DEV Community · dev.to