This site's own technique
Error-level analysis: the exact formula the local checker runs.
JPEG compression divides an image into 8×8 pixel blocks, transforms each with a discrete cosine transform, and quantizes the result — rounding high-frequency coefficients more aggressively than low-frequency ones, according to a quality-dependent divisor table. That rounding is lossy, and it stabilizes: resaving an already-compressed region at the same quality changes it only slightly, because it's already sitting near that quantization grid. A freshly generated, pasted, or never-before-compressed region shifts much more, because it isn't.
1Recompress
The checker draws your image to canvas, then re-encodes it via canvas.toDataURL('image/jpeg', 0.9) — a second lossy JPEG pass at a fixed quality.
2Diff every pixel
It loads the recompressed version back in, draws both to canvas, and computes |R−R'| + |G−G'| + |B−B'| per pixel between the original and the resave.
3Amplify
The raw difference is usually tiny (single digits per channel), so the checker multiplies it by a fixed gain — amp = min(255, diff × 8) in this site's code — so it's visible as a heatmap instead of a wash of near-black pixels.
4Read it as variance, not a verdict
A uniform, low-error result means the whole image was compressed once, consistently — true of both an untouched photo and a single-pass AI generation. A patchy result, with one region lighting up far brighter than the rest, means that region has a different compression history than its surroundings — the classic signature of a local edit or a pasted-in element, independent of whether the base image is AI or real.