ScrubPony vs jhead

Same spirit. Different decade.

jhead is a small, fast, dependency-light C program for JPEG header manipulation that has been quietly doing its job since the nineties. ScrubPony is the same kind of thing with a narrower scope and a different set of defaults.

the short version

jhead to inspect and adjust EXIF; ScrubPony to remove everything identifying and prove the picture survived. jhead reads EXIF, renames files by date, rotates images, and can strip non-image data with -purejpg. ScrubPony does removal only, classifies every segment by its payload identifier rather than its marker, drops unrecognised vendor segments by default, keeps orientation and colour, and writes atomically.

At a glance.

ScrubPonyjhead
FormatsJPEG onlyJPEG only
Dependencieslibclibc
Reads EXIFA summary: byte order, entry count, GPS, thumbnail, orientationDecoded and printed in detail
Removes metadataPublished policy, identifier-based-purejpg and -de/-dc options
Unknown vendor segmentsDropped by default — fails closedDepends on the option chosen
Identifier-based classificationAlways; the marker code never decidesMarker-oriented in places
Keeps orientation when EXIF goesRe-emits a 36-byte block automaticallyEXIF removal takes the tag with it
Keeps ICC colour profileBy default; --strict drops it-purejpg removes it
Rotates imagesNever touches pixelsLossless rotation via jpegtran
Renames by dateOut of scopeA signature feature
Atomic writesTemporary, fsync, rename — 30 SIGKILLs assertedNo documented interrupt guarantee
Mirrored output tree-d mirrors a whole treePer-file
Scriptable audit mode--check exits 2 on identifying metadataNot provided
Fuzzed read path7,575,421 libFuzzer executionsLong-established, no published figure
LicenceMITPublic domain

Honest tradeoffs.

Where jhead wins

  • It does more than remove. Rename a shoot by capture date, shift timestamps across a set, rotate losslessly, print a detailed EXIF dump. All useful, all deliberately absent here.
  • It has been everywhere for decades. Packaged in essentially every distribution, familiar to a generation of photographers, and stable in a way that only very old software gets to be.
  • Lossless rotation. jhead can hand off to jpegtran and actually rotate the pixels without recompressing. ScrubPony will never touch a pixel, which means it can never do this.
  • Public domain. Even fewer strings than MIT.
  • Detailed EXIF output. jhead prints a proper decoded dump; ScrubPony's dry run gives a one-line summary and leaves the detail to exiftool.

Where ScrubPony wins

  • The marker code never decides. Every segment is classified by the exact identifier bytes at the front of its payload, which is what makes it possible to keep an ICC profile and drop an MPF block that shares its APP2 marker.
  • Unrecognised segments are dropped by default. Not on request, not with the right flag — by default, because an undocumented vendor segment is exactly where a serial number lives.
  • Orientation and colour survive. A 36-byte orientation block is re-emitted automatically, and the ICC profile is kept unless you ask otherwise. Removing everything is easy; removing everything identifying and leaving the picture usable is the harder version.
  • Batch-first. Whole trees, mirrored output directories with -d, per-file error isolation, symlink refusal, sorted deterministic ordering.
  • An exit code for pipelines. --check reports without changing anything and exits 2, so it fits a pre-commit hook or a CI gate.
  • Modern verification. 741 checks under ASan and UBSan, 7.5 million fuzz executions, 30 SIGKILLs mid-write, and a 13/13 cross-check against exiftool.

The verdict.

  • Choose jhead if you want to rename files by capture date, rotate losslessly, adjust timestamps, or read a detailed EXIF dump from a tool that is already installed.
  • Choose ScrubPony if the job is removal, you want unknown segments handled by default, and you want orientation and colour to survive without arguments.
  • Use both if you organise as well as clean. jhead to rename and rotate, ScrubPony as the last step before anything leaves the machine.

Common questions.

Is jhead unsafe?

No. It is a long-lived, widely used program doing what it says. The differences here are about defaults and guarantees — what happens to a segment nobody recognised, and what is on disk if the process is killed mid-write.

Does -purejpg leave anything behind?

That depends on the file and the version, and it is not a claim worth making from the outside. What is worth saying is what ScrubPony does: it publishes its policy table, drops unknowns by default, and gives you a dry run that names every segment and its verdict so you can check rather than trust.

Why not contribute to jhead instead?

Different goals. jhead is a metadata workbench that can also strip; ScrubPony is a stripper that deliberately cannot do anything else, and that constraint is what makes the pixel and interrupt guarantees easy to state and easy to test.

Try ScrubPony

Free and MIT-licensed. No dependencies beyond libc, no configure step, and a pixel claim you can check in two commands.