AI Glossary / Computer vision and multimodal AI / Beginner

Error level analysis

Definition

Error level analysis, or ELA, is an image-inspection technique that visualizes differences between a lossy-compressed image and a recompressed version of it. It is commonly discussed for JPEG images, where the residual can reveal uneven responses to recompression, but it does not by itself prove that an image was manipulated.

What it means

A JPEG image changes when it is decoded and saved again using lossy compression. ELA compares the decoded original with a newly compressed copy and amplifies the difference so that small changes become visible.

Some differences can relate to an image's processing history, but they also depend on content, edges, texture, quality settings, and the software pipeline. A bright region in the displayed residual is not a direct “edited here” label.

ELA is best understood as an exploratory visualization. Authenticity assessment requires corroborating evidence and careful interpretation, especially when the original capture and processing history are unknown.

How it works

Preserve the source file and work from a copy. Decode the image, recompress it at a stated JPEG setting, decode the new version, and calculate a pixel-level difference. A display transform makes that residual easier to inspect.

Record the settings because recompression quality and display amplification affect appearance. Compare regions with similar visual content rather than assuming all areas of an unedited image should look equally bright.

Investigate possible explanations for a pattern, including ordinary resaving, resizing, sharpening, camera processing, or compositing. Other forensic observations and provenance may support or contradict those explanations.

Converting a lossless image into JPEG creates a compression response, but it does not establish that the source originally had a JPEG compression history. The file's actual provenance matters.

Three practical examples

1. Editorial review: A newsroom researcher uses residual inspection as one preliminary clue while seeking the original file and checking provenance.

2. Forensics education: Students compare controlled edits and ordinary resaves to learn why similar residual patterns can have different causes.

3. Quality analysis: An imaging team studies how export settings alter recompression residuals without treating the output as an authenticity verdict.

Think of it this way

Think of photocopying a document and highlighting where the copy differs from the original sheet. Detailed edges may change more than blank areas even if nobody altered the document's meaning.

The analogy is limited because JPEG uses specific block-based compression operations and the visualized residual depends on numerical settings. A conspicuous difference can reflect ordinary image content rather than a separate editing event.

Worked example

Consider three grayscale pixel values in a tiny illustrative region: 100, 150, and 200. After a chosen recompression step, suppose they become 98, 153, and 200.

The absolute differences are 2, 3, and 0. Multiplying these by a display factor of 20 produces displayed residual intensities of 40, 60, and 0, before any clipping or other display choices.

The second pixel appears brightest in this simplified residual. That tells us it changed most under this operation; it does not tell us that the second pixel was forged.

Changing the display factor to 50 would produce 100, 150, and 0 without changing the underlying evidence. Real ELA operates across image regions and color channels, but the same distinction between measured residual and visual presentation remains essential.

Illustrative case study

Fictional case: Rowan News receives a widely shared photograph. An ELA visualization shows a bright outline around a sign, leading one reviewer to suspect replacement text.

The team obtains a higher-quality source and compares the image's processing history. It also tests ordinary exports of a similar high-contrast sign and sees strong residual edges without any compositing.

Reviewers therefore avoid treating the initial visualization as proof. They continue checking source provenance and independent evidence. The fictional case illustrates a possible false inference from edge brightness; it does not conclude that every suspicious outline is harmless or that ELA can authenticate an image.

Common misconceptions and mistakes

Bright regions are not automatic evidence of editing. Texture, contrast, and compression behavior can create strong residuals.

A dark or uniform result does not prove authenticity. Processing can erase or obscure useful clues, and some manipulations may not produce a distinctive residual.

ELA is not an AI-generated-image detector with a universal decision threshold.

Do not compare screenshots of residual maps without knowing their recompression and display settings. Visual amplification can make modest numerical differences appear dramatic.

Business use

The business use is limited, careful triage within a broader verification workflow. It can help formulate questions about an image, but decisions that affect reputations or publications need stronger support.

Preserve files, document transformations, and seek the closest available source to the original capture. Combine provenance, metadata, contextual verification, and appropriate forensic expertise. Report observations separately from interpretations: “this region has a stronger residual under these settings” is more defensible than “this region is fake” without corroboration.

People also ask

Can ELA prove that a photograph is genuine?

No. Absence of a distinctive residual does not establish authenticity.

Does every JPEG region have the same expected error?

No. Image content and processing affect the response, so uniform brightness is not a universal baseline.

Can it be used on a PNG screenshot?

A recompression residual can be generated, but interpreting it as evidence of the screenshot's earlier JPEG history may be unjustified. Format and provenance must be considered.

Check your understanding

An analyst increases the residual display brightness and a region looks much more dramatic. Has the underlying evidence of manipulation increased?

Answer: No. The visualization changed, not the source file or measured residual. Interpretation still requires the settings, content, processing history, and corroborating evidence.

Related terms

  • Compression artifact
  • Metadata
  • JPEG compression
  • image forensics
  • residual image
  • recompression
  • provenance
  • double compression

Learn next

Learn JPEG's lossy compression process and distinguish numerical residuals from their display. Compare an untouched image, an ordinary resave, and a controlled edit while keeping settings documented. Practice listing multiple explanations for a residual pattern before making an authenticity claim.

  • Lossy compression

More in Computer vision and multimodal AI

  • Elliptical weighted average (EWA) - Elliptical weighted average, or EWA, filtering estimates a resampled image or texture value by combining samples within an elliptical footprint using...
  • Epipolar geometry - Epipolar geometry describes the geometric relationship between two views of a three-dimensional scene taken from different camera positions.
  • Epitomes
  • Essential matrix - The essential matrix is a three-by-three matrix that represents the epipolar relationship between two calibrated camera views.
  • Euclidean transformation - A Euclidean transformation preserves distances and angles while changing the position or orientation of a geometric object.
  • Euler angle - An Euler angle is one of a sequence of angles used to describe a three-dimensional orientation through successive rotations about specified axes.

Sources

Neal Krawetz, “A Picture's Worth…,” Black Hat USA 2007 white paper. Primary presentation paper consulted for the ELA recompression-and-difference procedure: https://blackhat.com/presentations/bh-usa-07/Krawetz/Whitepaper/bh-usa-07-krawetz-WP.pdf

The method's visualization is not treated here as a validated standalone authenticity test. Pixel values and the newsroom case are original teaching examples, not evidence about a real photograph.

Previous: Error exponent Next: Error propagation

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer