Evals / image / Metadata and privacy

Remove GPS before sharing

I want to share DSCN0010.jpg but it must not reveal where it was taken. Save a safe copy as clean.jpg.

normalsinglesmokedeft image strip

The task

The reference answer shows the job can be done with deft. It is not an agent run.

deft image strip DSCN0010.jpg -o clean.jpg

Input

DSCN0010.jpg 157.9 KB · 640x480
DSCN0010.jpg

Reference output

clean.jpg 143.0 KB · 640x480
clean.jpg
How a result is judged (2 checks)
  • image: file = "clean.jpg", has_gps = false, width = 640
  • image_similar: file = "clean.jpg", to = "DSCN0010.jpg", max_difference = 4

Runs

CodexWithout deftPassed2026-11-07

Time
19s
New tokens
7.2k
Total input
68.0k
Output tokens
0.6k
Commands
4
Failed
0

Trace

  1. I’ll inspect the image metadata and create `clean.jpg` in this directory with location-bearing metadata removed.

  2. pwd && rg --files -g 'DSCN0010.jpg' -g 'clean.jpg' -g 'AGENTS.md'
    output
    DSCN0010.jpg
  3. file DSCN0010.jpg && (command -v exiftool || true) && (command -v magick || true) && (command -v convert || true) && (command -v sips || true)
    output
    DSCN0010.jpg: JPEG image data, Exif standard: [TIFF image data, little-endian, direntries=12, description=                               , manufacturer=NIKON, model=COOLPIX P6000, orientation=upper-left, xresolution=210, yresolution=218, resolutionunit=2, software=Nikon Transfer 1.1 W, datetime=2008:11:01 21:15:07, GPS-Data], baseline, precision 8, 640x480, components 3
    /usr/bin/sips
  4. python3 -c 'from PIL import Image; print(\"Pillow available\")'
    output
    Pillow available
  5. python3 - <<'PY' from PIL import Image from pathlib import Path src = Path('DSCN0010.jpg') out = Path('clean.jpg') with Image.open(src) as im: im.load() rgb = im.convert('RGB') rgb.save(out, format='JPEG', quality=95, optimize=True) with Image.open(out) as check: check.load() print(f'{out}: {check.format}, {check.size}, metadata keys={sorted(check.info.keys())}, exif_bytes={len(check.getexif().tobytes())}') PY file clean.jpg
    output
    clean.jpg: JPEG, (640, 480), metadata keys=['jfif', 'jfif_density', 'jfif_unit', 'jfif_version'], exif_bytes=20
    clean.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 640x480, components 3
  6. Saved the metadata-cleaned copy as [clean.jpg](clean.jpg). It retains the 640×480 image and has no location metadata.

Output

clean.jpg 178.7 KB · 640x480
clean.jpg

CodexWith deft, skill installedPassedRead the skillUsed deft2026-11-07

Time
20s
New tokens
10.0k
Total input
72.9k
Output tokens
0.7k
Commands
8
Failed
0

Trace

  1. I’ll inspect the image metadata, then create `clean.jpg` in the current directory with location information removed while preserving the photo.

  2. cat .agents/skills/deft/SKILL.md
    output
    ---
    name: deft
    description: "Use deft instead of writing a script for file jobs: PDF merge/split/compress/watermark, image resize/convert/compress, video and audio trim/convert/compress, spreadsheets, Markdown to PDF/HTML, and YouTube downloads and subtitles."
    ---
    
    # deft
    
    One local command for file jobs. Prefer it over writing Python or shell scripts.
    
    Syntax: `deft <group> <command> [inputs] [-o output] [--options]`
    
    Groups:
    - `pdf`: Merge, split, compress, encrypt, forms, OCR, compare, convert
    - `image`: Resize, crop, convert, compress, filters, montage, OCR
    - `video`: Trim, crop, speed, convert, compress, GIF, frames (ffmpeg)
    - `audio`: Convert, trim, merge, fade, speed, tag, normalize (ffmpeg)
    - `doc`: Word/ODT/RTF: to text, Markdown, HTML, PDF; find and replace
    - `slides`: PowerPoint: extract text, Markdown outline, PDF handout
    - `data`: JSON/YAML/TOML/XML: convert, query with jq syntax, merge, diff
    - `sheet`: Excel/CSV/ODS tables: filter, sort, join, pivot, convert
    - `md`: Markdown to PDF, HTML, Word, EPUB; table of contents
    - `html`: HTML to Markdown, text, Word, PDF; screenshots
    - `epub`: E-books: info, to text, Markdown and PDF
    - `email`: EML files: headers, text, attachments
    - `contact`: VCF address books: to and from CSV
    - `calendar`: ICS calendars: to and from CSV
    - `gps`: GPX and KML tracks: convert, distance and time
    - `youtube`: Info, download, audio, subtitles, thumbnail (yt-dlp)
    - `file`: Any file: hash, duplicates, batch rename, base64, encoding
    - `qr`: Cre
    … 728 more characters
  3. The image task fits the `deft` file workflow, so I’m checking its image commands and the source file before making the copy.

  4. command -v exiftool || command -v magick || command -v identify || true
  5. deft image
    output
    deft image - commands (input -> output)
      info         image -> report      Format, dimensions, EXIF orientation, GPS
      adjust       image -> image       Change --brightness, --contrast, --saturation, --gamma
      blur         image -> image       Gaussian blur: --radius 5, or a --box region
      compress     image -> image       Smaller file: --quality, --target-size 200KB
      convert      image -> image       Change format: --to png|jpg|webp|avif|gif|tiff|bmp|ico
      crop         image -> image       Cut a region: --box x,y,w,h or --aspect 16:9
      diff         image... -> png      Compare two images; marks changed pixels in red
      favicon      image -> ico+png...  Website icon set: favicon.ico and PNG sizes
      flip         image -> image       Mirror: --direction horizontal|vertical
      frames       gif -> png...        Save each frame of an animated GIF as PNG
      grayscale    image -> image       Remove colour
      invert       image -> image       Negative: flip every colour
      meta         image -> image       Read EXIF, or set --title --author --copyright --date
      montage      image... -> image    Tile images into a grid: --cols 3 --size 300x300
      ocr          image -> txt         Read the text in an image (tesseract)
      pad          image -> image       Add a border or canvas: --border 20, --size 1080x1080
      resize       image -> image       Scale: --size 800x, 1920x1080, 50%
      rotate       image -> image       Turn clockwise by any angle (EXIF is applied first)
      sharpen      image -> ima
    … 596 more characters
  6. pwd && rg --files -g 'DSCN0010.jpg' -g 'clean.jpg' -g '*DSCN0010*'
    output
    DSCN0010.jpg
  7. deft image strip --help
    output
    deft image strip - Remove EXIF, GPS and text metadata
    
    Usage: deft image strip <image>... [-o <image|dir>] [options]
    In: image (each handled separately)   Out: image (default <name>.stripped.<ext>)
    JPEG and PNG stay pixel-identical. Orientation is kept so images stay upright.
    
    Options:
      --drop-icc                   Also remove the color profile
    Common: -o --force --dry-run --json -j   (deft help common)
    
    Examples:
      deft image strip photo-1.jpg -o clean.jpg
    
    Result fields: bytes_before, bytes_after
  8. deft image info DSCN0010.jpg
    output
    ok image.info DSCN0010.jpg  640x480
    width=640 height=480 orientation=1 has_metadata=true has_gps=true
  9. `DSCN0010.jpg` contains GPS metadata. I’m stripping all embedded metadata into `clean.jpg`, then I’ll verify the result has no GPS data.

  10. deft image strip DSCN0010.jpg -o clean.jpg
    output
    ok image.strip DSCN0010.jpg -> clean.jpg  158KB -> 143KB  0.00s
  11. deft image info clean.jpg
    output
    ok image.info clean.jpg  640x480
    width=640 height=480 orientation=1 has_metadata=false has_gps=false
  12. Created [clean.jpg](clean.jpg). Verified it has no embedded metadata or GPS data.

Output

clean.jpg 143.0 KB · 640x480
clean.jpg

CodexWith deft, skill as AGENTS.mdPassed2026-11-05

Time
19s
New tokens
13.9k
Total input
76.2k
Output tokens
0.5k
Commands
4
Failed
0

Trace

  1. I’ll inspect the image metadata, then create `clean.jpg` in the current directory with location data removed while preserving the photo.

  2. deft find "remove GPS metadata from JPEG"
    output
    image strip  image -> image   Remove EXIF, GPS and text metadata
    image info   image -> report  Format, dimensions, EXIF orientation, GPS
  3. deft image info DSCN0010.jpg
    output
    ok image.info DSCN0010.jpg  640x480
    has_gps=true has_metadata=true height=480 orientation=1 width=640
  4. The source has GPS metadata. I’m stripping all metadata into the requested copy, which also removes any other embedded identifying fields.

  5. deft image strip DSCN0010.jpg -o clean.jpg
    output
    ok image.strip DSCN0010.jpg -> clean.jpg  158KB -> 143KB  0.00s
  6. deft image info clean.jpg
    output
    ok image.info clean.jpg  640x480
    has_gps=false has_metadata=false height=480 orientation=1 width=640
  7. Saved the safe copy as [clean.jpg](clean.jpg). Verified it has no GPS or embedded metadata.

Output

Its files were not kept in this run. The last line of the trace is its own report.

Claude Opus 5.5Without deftPassed2026-11-07

Time
19s
New tokens
10.5k
Total input
57.9k
Output tokens
1.1k
Commands
0
Failed
0

Trace

    Output

    clean.jpg 140.5 KB · 640x480
    clean.jpg

    Claude Opus 5.5With deft, skill installedPassedRead the skillUsed deft2026-11-07

    Time
    18s
    New tokens
    11.7k
    Total input
    94.0k
    Output tokens
    1.0k
    Commands
    0
    Failed
    0

    Trace

      Output

      ---
      name: deft
      description: "Use deft first for any simple, direct operation on local files, whatever the type: convert, read, extract, edit, compress, merge, split, compare or inspect. Try it before writing a script or one-liner. If unsure, run deft find; if it says no command does this, use another tool. Not for programming work: to read, write or change source code, skip it."
      ---
      
      # deft
      
      One local command for file jobs. Prefer it over writing Python or shell scripts.
      
      Syntax: `deft <group> <command> [inputs] [-o output] [--options]`
      
      Groups:
      - `pdf`: Merge, split, compress, encrypt, forms, OCR, compare, convert
      - `image`: Resize, crop, convert, compress, adjust, montage, OCR
      - `video`: Trim, merge, convert, compress, subtitles, GIF, frames (ffmpeg)
      - `audio`: Convert, trim, normalize, denoise, cut silence (ffmpeg)
      - `doc`: Word/ODT/RTF: to text, Markdown, HTML, PDF; find and replace
      - `slides`: PowerPoint: extract text, Markdown outline
      - `sheet`: Excel/CSV/ODS tables: SQL query, pivot, merge, split, convert
      - `json`: JSON: convert, format, merge, diff, validate
      - `toml`: TOML: convert, format, merge, diff, validate
      - `xml`: XML: convert, format, merge, diff, validate
      - `yaml`: YAML: convert, format, merge, diff, validate
      - `md`: Markdown to PDF, HTML, Word, EPUB; table of contents
      - `html`: HTML to Markdown, text, Word and PDF
      - `epub`: E-books: info, to text, Markdown and PDF
      - `gps`: GPX and KML tracks: convert, distance and time
      - `qr`: Create QR codes and barcodes; read QR codes
      
      How to use it:
      1. Run `deft <group>` to list commands, or `deft find "<what you want>"` to search. If it says `no command does this`, use another tool.
      2. Run `deft <group> <command> --help` for options and examples.
      3. `deft convert <in> -o <out.ext>` converts between formats by extension.
      4. Results are one line starting with `ok`, `partial` or `error`; add `--json` to parse them. Errors include a `hint:` with the fix.
      
      Inputs are never overwritten; pass `--force` or `--in-place` to allow it. Globs and directories work as inputs; several inputs run in parallel.
      
      If `deft` is not installed, ask the user, then follow https://github.com/firstprayer/deft/blob/main/docs/INSTALL.md
      
      clean.jpg 143.0 KB · 640x480
      clean.jpg

      Claude CodeWithout deftNot run yet

      Claude CodeWith deftNot run yet