Code
Messages hidden in plain sight, in words, invisible characters, pixels, sound, printed dots, stacked transparencies, DNA and the bytes of files, and the analyses that find them.
Image Forensics
Checks a picture for signs that it was altered: Krawetz’s error level and colour components (2007), Popescu and Farid’s copied patches (2004), Mahdian and Saic’s noise (2009), a level sweep and the light; and what its file holds besides: the Exif thumbnail, an animation’s frames, a PNG’s chunks and C2PA content credentials, their hashes recomputed and no signature verified. Each view says what it cannot show; none gives a verdict.
Terms
History, how it works, how it was checked, limits
History
Fridrich, Soukal and Lukáš (2003) and Popescu and Farid (2004) found copied patches by sorting a picture’s blocks; Krawetz (2007) set out the error level and the colours’ principal components; Mahdian and Saic (2009) measured the noise block by block. Content credentials are the C2PA’s (Technical Specification 1.4, 2023).
How it works
Pixels. Error level saves the picture again as a JPEG at Krawetz’s 95% and outlines an 8 × 8 cell three spreads above the rest, Unveil’s mark. Clones follows Popescu and Farid’s Appendix A, counting a pair only where its blocks differ by 6 levels or less on average and passing over blocks smoother than a variance of 25, Unveil’s settings: as printed, a pair counts however unlike its blocks. Noise takes σ̂ = median|HH1| / 0.6745 of a db8 wavelet in blocks and merges regions while they differ by under 1. The level sweep stretches a window of brightness, Light draws the Sobel gradient, Components each pixel’s distance from an axis of the colours’ spread.
File. The Exif thumbnail is set against the picture brought to its size. A GIF’s or an APNG’s frames are composed by their specifications’ rules, a frame on screen under a twentieth of a second marked. A PNG’s chunks are listed with their CRCs and Table 7’s order, and where IHDR’s CRC fails the size that makes it agree is searched for and the picture read there. Content credentials are read, and their hashes recomputed.
How it was checked
Each check finds a known alteration in a picture of Unveil’s own. Of 12 copies among drawn leaves, 12 found as PNGs and after a JPEG save at 90, 9 at 75, and none in 12 untouched tiles; 12 of 12 noisy rectangles set apart, none in 12 untouched tiles. The frames are Pillow’s, pixel for pixel, but for the alpha of a frame laid over another, which Pillow mixes too; the credentials are the C2PA’s own test files read as C2PA Tool reports them, a changed one’s hash failing where it reports a mismatch.
The tests hold 48 checks of this tool; 7 rest on outside material:
- Another’s computation Noise: Daubechies’s db8 as Python’s PyWavelets stores its sixteen taps (wavelets_coeffs.template.h) is the minimum-phase filter of Daubechies’s construction worked out here, to 10⁻¹² in every tap; it sums to √2, is orthonormal to its even shifts, and its high-pass filter has eight vanishing moments
- Another’s computation Light: by the Sobel weights of the source of Python’s scikit-image (the edge [1, 0, −1] convolved along one axis, the smoothing [1, 2, 1] / 4 along the other), a ramp rising 3 a pixel to the right gives gx = 6 and gy = 0, brightness rising toward 0°; one rising upward toward 90°
- Another’s computation … the direction drawn as a hue by Python’s colorsys.hsv_to_rgb, held at 42 places
- Another’s computation Clones: the rates the tool states (RATES_MEASURED) are those measured here, on 24 tiles of 128 × 96 of drawn leaves, the texture Fridrich, Soukal and Lukáš name as a copy’s best cover, half with a patch of 32 or 40 copied: as PNGs made here, and saved alone as JPEGs of quality 90 and 75 by Python’s Pillow (clone-set-q90.png, clone-set-q75.png)
- Another’s computation GIF decoder (GIF89a, its LZW from Appendix F): the four frames of a GIF of Unveil’s own making composed by the specification’s disposal rules, each the same, pixel for pixel, as Python’s Pillow draws it on the screen
- A print’s own example … on the sample (the crate hidden by leaves copied 94 across, saved as a JPEG of quality 90 and read by Pillow), the copy alone is found; Popescu and Farid’s steps as printed, counting every pair near in the sorting however unlike, find it among other offsets, and on the noisy scene find hundreds where nothing was copied (the 32 with most pairs drawn, the rest counted)
- A print’s own example PNG chunks (PNG Third Edition §5.3 and Table 7): a tEXt changed after its CRC was written found by its CRC alone, and an IDAT after IEND found standing where Table 7 forbids
Limits
No check says a picture is genuine or forged. The rates are measured on drawn pictures, and the error level has none. A copy scaled, turned or mirrored is not found. No signature of content credentials is verified: who signed is as the certificate says, and most pictures carry none. Double compression and JPEG ghosts are not built.
- Neal Krawetz, “A Picture’s Worth… Digital Image Analysis and Forensics”, Black Hat USA 2007 (white paper)
- Alin C. Popescu and Hany Farid, “Exposing Digital Forgeries by Detecting Duplicated Image Regions”, Dartmouth College, Technical Report TR2004-515 (2004)
- Jessica Fridrich, David Soukal and Jan Lukáš, “Detection of Copy-Move Forgery in Digital Images”, Digital Forensic Research Workshop (DFRWS) 2003
- Babak Mahdian and Stanislav Saic, “Using noise inconsistencies for blind image forensics”, Image and Vision Computing 27 (10), 2009, pp. 1497–1503
- PyWavelets, the Daubechies wavelets’ coefficients (pywt/_extensions/c/wavelets_coeffs.template.h)
- scikit-image, the Sobel operator’s weights (src/_skimage2/filters/edges.py)
- Python Software Foundation, colorsys — Conversions between color systems (the Python documentation)
- CompuServe, Graphics Interchange Format, Version 89a (1990), the W3C’s copy: its frames, disposal and LZW (Appendix F)
- W3C, Portable Network Graphics (PNG) Specification, Third Edition (2025): its chunks and their order (§5), APNG (§11.3.6), alpha compositing (§13.16)
- C2PA, Content Credentials: C2PA Technical Specification 1.4 (2023)
- Content Authenticity Initiative, c2pa-rs: JUMBF’s boxes and a JPEG’s APP11 segments as the C2PA’s own implementation reads them (sdk/src/jumbf/boxes.rs, sdk/src/asset_handlers/jpeg_io.rs)
- IANA, CBOR Object Signing and Encryption (COSE): COSE Algorithms (last updated 2026-11-13)
- C2PA public test files (CC BY-SA 4.0), two of whose pictures are this tool’s examples and its tests’ material