Remove all metadata from an image
Image metadata is everything in the file that is not pixels: EXIF (camera, lens, GPS position, timestamps), XMP (editing history, AI-generator tags), IPTC (captions, copyright), ICC (colour profile) and C2PA content credentials. AiPicDetect removes all of them at once by decoding the picture and re-encoding it from the raw pixel buffer, so nothing from the original container is copied.
Why re-rendering beats deleting tags
Tools that strip metadata tag by tag must know every container format, and new ones keep appearing (C2PA manifests live in JPEG APP11 segments, PNG and WebP have their own boxes). AiPicDetect takes the screenshot approach instead: Image.frombytes builds a brand-new image from the pixel buffer alone, the EXIF orientation is applied first so the result looks the same, and the new image is saved to a fresh JPEG, PNG or WebP. Whatever was in the old file cannot survive because it was never read into the new one.
Three steps
- 01
Inspecteren.
Voer
aipicdetect inspect photo.jpguit om de EXIF-, XMP-, IPTC-, C2PA- en ICC-blokken van het bestand op te sommen. - 02
Opschonen.
Voer
aipicdetect scrub photo.jpguit (ofPOST /scrub). AiPicDetect decodeert de pixels, past de EXIF-oriëntatie toe en bouwt een gloednieuwe afbeelding op uit de ruwe pixelbuffer. - 03
Verifiëren.
Voer
aipicdetect inspect photo.clean.jpguit; dit zou “no metadata signatures found” moeten tonen.
Options
aipicdetect scrub photo.jpg # writes photo.clean.jpg
aipicdetect scrub photo.png out.webp --format webp --quality 90
aipicdetect batch inbox clean --detect # whole folder plus an AI-likelihood report
- The output format defaults to the input format; HEIC, TIFF and other inputs become JPEG (or PNG when they have transparency).
--qualityapplies to JPEG and WebP (default 95). PNG output is lossless.- Transparency is kept for PNG and WebP output and flattened for JPEG.
Over HTTP
curl -s -F "file=@photo.jpg" -o photo.clean.jpg "https://aipicdetect.com/scrub"
The response carries an X-AiPicDetect-Removed header naming the blocks found in the upload. POST /analyze does the same and adds an AI-likelihood score and a download link. On the hosted instance uploads are processed in memory only (privacy); for sensitive material, run AiPicDetect locally.
Caveats
- Removing the ICC profile means colour-managed viewers will assume sRGB; for wide-gamut photos convert to sRGB before scrubbing.
- Re-encoding a JPEG is lossy. Use
--quality 100or PNG output if fidelity matters more than size. - Scrubbing removes provenance for everyone downstream, including C2PA content credentials that prove authenticity. Keep an original if you may need it.
Laatst bijgewerkt 2026-09-13 · broncode op GitHub