JPEG quality
Estimate JPEG quality (0-100) from quantization tables plus an ELA-style re-compression detector.
Estimates the effective JPEG compression quality from the quantization tables and heuristically detects re-compression. It parses JPEG segments, finds DQT (Define Quantization Table) markers, compares the quantizers against the reference tables from ISO/IEC 10918-1 Annex K, and computes the quality factor using the inverse IJG formula (the same 0-100 scale used by libjpeg, MozJPEG and Photoshop): luma and chroma separately, then averaged. From SOF0/SOF2 it also pulls subsampling (4:4:4 / 4:2:2 / 4:2:0 / 4:4:0), baseline-vs-progressive mode and dimensions. The re-compression detector re-encodes the input as JPEG at the quality it just estimated, then measures the average absolute brightness contrast of the difference between the original and the re-encoded copy. Low (<3) → the source is a fresh save at that quality (single compression); medium (3-7) → likely one re-save at a different quality; high (>7) → clear traces of multiple compressions (probably retouched and re-saved). Useful for journalists checking that an “original” is not a multi-generation copy; designers gauging how aggressively a delivered image was compressed before they ship it; photographers confirming that the messenger backup is not below quality 70. No vendors, plain JavaScript. Processing happens in the browser, the file never leaves your device.