How JPEG ghost detection works
Every JPEG image carries invisible traces of its compression level. When you re-save a JPEG at the same quality it was originally encoded, the error introduced is minimal — the image is already "adapted" to that quality. But if a region was pasted from a different JPEG saved at a different quality, that spliced region responds differently to recompression. The JPEG Ghost Scanner exploits this by re-encoding the image at every quality level from 60 to 99 and measuring pixel-by-pixel differences. At the estimated original quality, spliced regions "glow" because they show higher error than the background. The technique complements the ELA Scanner, which detects compression inconsistencies from a single re-save rather than a full quality sweep.