image

    Double JPEG Compression

    The telltale compression history of a real photo — and a signal detectors use against single-pass AI exports.

    Double JPEG compression refers to an image being JPEG-compressed more than once. Real camera photos almost always have a multi-stage compression history: the camera writes a JPEG in-device, then the image is re-compressed when it's edited, uploaded, or shared. Each stage leaves detectable traces in the DCT (discrete cosine transform) coefficients.

    AI-generated images usually don't have this history. A generator outputs a PNG or a single-pass JPEG, which has a clean, single-compression signature. Forensic detectors can spot the difference — the absence of double-compression traces is itself a weak signal that an image didn't come from a normal camera-and-sharing pipeline.

    The DCT coefficient histograms tell the story. A singly-compressed image has smooth coefficient distributions; a doubly-compressed one shows characteristic periodic peaks. Detectors model this directly.

    SynthGuard's JPEG double-compression layer reconstructs a realistic compression chain — compressing at quality levels that mimic a camera's in-device JPEG followed by an export re-compression. The result carries the double-compression signature a real shared photo would have, removing one more anomaly a forensic tool could flag.

    Tools that address Double JPEG Compression

    Related terms

    Related reading