Double JPEG Compression
Definition
The situation where an image has been JPEG-encoded, decoded to a bitmap, and then JPEG-encoded again. The second quantisation step leaves a characteristic pattern in DCT coefficient histograms, specifically zeros at multiples of the first quantisation step that the second pass cannot fill. Detecting this pattern indicates the image has been through at least two JPEG saves, which is consistent with editing.
- Cause
- Encode, decode, re-encode a JPEG image
- Detected via
- DCT coefficient histogram artefacts
- Signature
- Zeros at multiples of first quantisation step
- Forensic meaning
- Consistent with editing, not proof of it
Common questions
Why doesn't double JPEG compression alone prove an image was maliciously altered?+
Many innocuous actions produce a second compression pass, such as resaving a photo, uploading to social media that recompresses images, or simple format conversion. Analysts treat the artefact as evidence the file has a compression history worth investigating further, not as proof of tampering.
Can double compression analysis localise which region of an image was edited?+
Yes, when an edited region was pasted in after the first compression and the whole image was saved again, that region's DCT grid alignment or quantisation history can differ from the untouched background, which analysts use to map the likely edited area.
Related terms
- JPEG Ghost
- A visualisation technique introduced by Farid (2009) that reveals regions compressed at a quality factor different from the rest of the image....
- Quantisation Table
- A matrix of 64 integer divisors, one per DCT coefficient position, that controls how much each frequency component is rounded during JPEG...
- Block Grid Phase
- The horizontal and vertical offset of the 8x8 encoding grid relative to the image coordinate origin. A phase of (0,0) means the...
- Blocking Artefacts
- Visible rectangular discontinuities at 8x8 block boundaries, caused by independent quantisation of adjacent blocks. At splice boundaries, misaligned block grids produce a...
- Blocking Artifact
- A visual discontinuity at the boundary between two adjacent 8x8 blocks in a JPEG image, caused by independent quantisation of each block....
- DCT (Discrete Cosine Transform)
- The mathematical transformation applied to each 8x8 pixel block during JPEG compression, converting spatial pixel values into a set of frequency coefficients...
- Discrete Cosine Transform (DCT)
- A mathematical transform that expresses a block of pixel values as a sum of cosine functions at different frequencies. JPEG applies the...
- Quality Factor
- The 1-100 scale that most JPEG encoders expose to the user, controlling how aggressively the quantisation table rounds coefficients. The factor is...
Explained in these topics
- DCT Block Boundaries and Quantisation Grid Analysis
- JPEG Compression Artefacts and Double-Compression DetectionThe result of decoding a JPEG, applying any edit, and saving as JPEG again. The coefficient histograms of doubly-compressed images have a distinct periodic sha...