Compare PNG Images
Compare two PNG images pixel-by-pixel with slider overlay, difference heatmap, side-by-side view, and detailed change statistics.
About
Pixel-level image comparison detects changes invisible to the human eye. A single altered pixel in a 1920ร1080 PNG represents just 0.00005% of the frame, yet it can indicate a rendering regression, an unauthorized asset modification, or a lossy re-encode masquerading as lossless. This tool computes the Euclidean distance โโ(c1 โ c2)2 across RGB channels for every pixel pair and maps results to a visual heatmap. It assumes both images share identical dimensions. Results are approximate when comparing images with different alpha pre-multiplication states.
Five comparison modes cover different inspection needs: slider overlay for spatial orientation, difference heatmap for magnitude analysis, side-by-side for quick visual scan, blend difference for artistic review, and an opacity fade for subtle shift detection. The tolerance parameter t filters per-channel noise below a threshold, useful when comparing JPEG-recompressed assets against PNG originals. Pro tip: export your reference render at the exact target resolution to avoid dimension-mismatch rejection.
Formulas
The core comparison metric is the Euclidean distance in RGB color space between corresponding pixels of images A and B:
where r, g, b are the red, green, and blue channel values (0 - 255) for pixel i. A pixel is marked as changed when di > t, where t is the user-defined tolerance threshold.
The Mean Squared Error across all N pixels:
Peak Signal-to-Noise Ratio quantifies reconstruction fidelity:
where di = per-pixel Euclidean distance, N = total pixel count (W ร H), t = tolerance threshold, MSE = mean squared error, and PSNR is measured in dB. A PSNR above 40 dB indicates near-imperceptible difference. Infinite PSNR means identical images.
Reference Data
| Metric | Formula / Method | Use Case |
|---|---|---|
| Pixel Delta | โ(ฮr)2 + (ฮg)2 + (ฮb)2 | Per-pixel color distance |
| Max Delta | max(di) for all i | Worst-case deviation |
| Mean Delta | 1N โ โdi | Overall drift severity |
| Changed Pixels | Count where di > t | Affected area size |
| Change % | ChangedN ร 100 | Summary statistic |
| PSNR | 10 โ log10(2552MSE) | Signal quality benchmark |
| MSE | 1N โ โdi2 | Error magnitude |
| SSIM Range | 0 (no match) - 1 (identical) | Perceptual similarity |
| PNG Bit Depth | 8 or 16 bits/channel | Precision ceiling |
| Color Space | sRGB (standard for web PNGs) | Comparison validity |
| Tolerance 0 | Exact match only | Lossless verification |
| Tolerance 5 | Filters JPEG artifacts | Cross-format comparison |
| Tolerance 10 | Filters minor color shifts | Monitor calibration delta |
| Tolerance 25 | Filters moderate changes | Layout regression tests |
| Tolerance 50 | Only major changes shown | Structural diff only |
| Max Euclidean Delta | โ3 ร 2552 ≈ 441.67 | Normalization ceiling |
| Heatmap: Green | d = 0 | Identical pixel |
| Heatmap: Yellow | d โค 50 | Minor difference |
| Heatmap: Orange | d โค 150 | Moderate difference |
| Heatmap: Red | d > 150 | Major difference |