Error Level Analysis: Detect JPEG Image Edits

Error Level Analysis (ELA) is a digital forensic technique designed to identify manipulated, spliced, or digitally altered areas within lossy image formats like JPEG. By measuring the rate of compression degradation across different parts of an image, ELA highlights anomalies that are invisible to the naked eye. This guide breaks down how JPEG compression functions, the mechanics behind Error Level Analysis, how to interpret ELA results to detect tampering, and the inherent limitations of this forensic method.

The Mechanics of JPEG Compression

To understand ELA, one must first understand how JPEG compression works. JPEG is a lossy file format, meaning that every time an image is saved as a JPEG, data is permanently discarded to reduce file size. The compression algorithm divides the image into an 8x8 pixel grid and simplifies color and high-frequency visual details.

With each subsequent save at a specific quality level, the amount of data lost decreases until the image reaches a state of compression equilibrium. At this point, saving the image again introduces very little additional degradation.

How Error Level Analysis Works

Error Level Analysis exploits this degradation process through a systematic three-step procedure:

  1. Resaving the Target: The analysis software takes the target JPEG and resaves it at a predetermined, known compression quality level (commonly 95%).
  2. Computing the Difference: The software compares the newly resaved image against the original version, pixel by pixel, calculating the mathematical difference in pixel values.
  3. Generating the Error Map: The resulting differences are amplified to make subtle variations visible, creating an ELA display where brightness corresponds to the amount of change (the "error level").

Revealing Manipulated Regions

In an authentic, unmodified JPEG, all sections of the image should degrade at roughly the same rate because the entire image shares the exact same compression history. Consequently, an unedited image will show a relatively uniform error level across visually similar surfaces.

When an image is altered, that uniform history is broken:

Interpreting ELA Results and Limitations

While ELA is an accessible forensic tool, interpreting the results requires caution:

Because of these factors, ELA is not a definitive automated test for forgery, but rather an indicator of interest. Forensic analysts rely on ELA to pinpoint suspicious areas for deeper verification using metadata analysis, noise analysis, and clone detection.