# Error level analysis

Error level analysis (ELA) is a digital image forensics technique that detects localized tampering in JPEG images by comparing compression error levels. Introduced by Neal Krawetz in 2007, it is used as a preliminary screening tool for image authenticity.

Error level analysis (ELA) is a technique in digital image forensics used to identify regions of a JPEG image that have been digitally altered. It was introduced by Neal Krawetz in 2007 as a heuristic method for quickly screening images for potential tampering. ELA operates on the principle that JPEG compression leaves consistent error patterns across an image; when a region is edited and re-saved, its compression error level changes.

## How it works

ELA works by re-saving the image at a known quality level, typically 95 percent, and computing the difference between the original and the re-saved version. The difference is then scaled to produce a visual map. In an unaltered image, the error levels are roughly uniform across the entire image. In a tampered image, the edited region often shows a different error level because it has been through a different compression history. This contrast can reveal the location of the alteration. The technique is sensitive to the quality level chosen; lower re-save qualities amplify differences but also increase noise, while higher qualities may obscure subtle edits.

## Applications

ELA is commonly used as a preliminary screening tool in digital forensics. It has been applied in journalism to verify photographs, in legal proceedings to examine evidence, and by online platforms to flag suspicious images. It is also one of the methods used to detect images produced by [generative-ai](https://www.wikiprompt.org/wiki/generative-ai) models, although its effectiveness on fully synthetic images is limited. Tools such as FotoForensics provide ELA visualizations to the public, allowing non-experts to inspect images. Images generated by models from [openai](https://www.wikiprompt.org/wiki/openai) and [google-deepmind](https://www.wikiprompt.org/wiki/google-deepmind) may be examined with ELA, but the technique is not definitive on its own and is often combined with other forensic methods.

## Limitations

ELA has several limitations. It is less effective on images saved at high quality levels, because the compression error is small and differences become harder to detect. It also fails on images that have been re-saved multiple times, as the error levels tend to become uniform again. Legitimate operations such as cropping, resizing, or re-encoding can produce false positives, leading to incorrect accusations of tampering. Furthermore, ELA is not reliable for detecting fully synthetic images, such as those produced by [generative-ai](https://www.wikiprompt.org/wiki/generative-ai) systems, because these images may not contain the same JPEG artifacts as natural photographs. As a result, ELA is best used as a screening step rather than as conclusive evidence.

## Relation to machine learning

With the rise of [machine-learning](https://www.wikiprompt.org/wiki/machine-learning) and [deep-learning](https://www.wikiprompt.org/wiki/deep-learning), ELA has been incorporated into automated forensic systems. An ELA map can be used as an additional input channel to a [neural-network](https://www.wikiprompt.org/wiki/neural-network) classifier, helping it distinguish between authentic and tampered images. Some approaches use a [residual-network](https://www.wikiprompt.org/wiki/residual-network) to process the error-level map, or a [u-net](https://www.wikiprompt.org/wiki/u-net) to segment tampered regions. Researchers at institutions such as [mit-csail](https://www.wikiprompt.org/wiki/mit-csail) and [stanford-ai-lab](https://www.wikiprompt.org/wiki/stanford-ai-lab) have explored combinations of ELA with learned features. In this context, ELA serves as a hand-crafted feature that complements the representations learned by [artificial-intelligence](https://www.wikiprompt.org/wiki/artificial-intelligence) models. The broader field of computer vision, including work by researchers such as [alexei-efros](https://www.wikiprompt.org/wiki/alexei-efros) at [berkeley-ai-research](https://www.wikiprompt.org/wiki/berkeley-ai-research), has informed the development of such forensic techniques. Academic groups at [carnegie-mellon-university](https://www.wikiprompt.org/wiki/carnegie-mellon-university) and [oxford-university](https://www.wikiprompt.org/wiki/oxford-university) have also contributed to the study of compression-based forensics, further integrating ELA with modern analytical methods.

---
Source: https://www.wikiprompt.org/wiki/error-level-analysis
License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
Last updated: 2026-09-14T06:29:19.53752+00:00
