Compare two images pixel by pixel

Compare two pixel-aligned images, highlight channel differences, and report changed-pixel percentage.

freeworks offlinenothing uploaded
ToolImage Diff
Input
Output

How it works

Both images are drawn onto the larger canvas, and absolute RGB channel differences are compared with the threshold. Changed pixels become highlighted in the diff image while the report counts differences.

  • Threshold 25 suppresses small channel noise.
  • The larger input dimensions define the comparison canvas.

Worked example

Compare two test images
Input
											Input1: data:image/png;base64,iVBORw0KGgo=
Input2: data:image/png;base64,iVBORw0KGgoA
Threshold: 25
										
Output
												Changed pixels: 1
Difference: 100%
											

When to use this

Visual regression tests compare screenshots, design reviews check exports, and photo workflows identify edits.

Edge cases

  • Different dimensions create transparent padding rather than cropping.
  • Per-channel changes below threshold are not counted.
  • The comparison does not compensate for translation, scaling, or JPEG noise.

References