How can I visually compare exactly what changed between two images?

Asked 5/6/2011

221 views

2 answers

0

I want to compare two versions of the same image pixel-for-pixel—for example, two JPEGs saved at different compression levels—and generate a clear visual map of the differences. Is there a simple way to do this in common image-editing software without writing custom code?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

15y ago

2 Answers

42

Photoshop + Layers FTW. (Yes, you can also use the Gimp, or any other editing software with the same functions.)

Start with your base image, in the case above, I used the jpeg quality 100 image.

  1. create a new layer atop it
  2. paste the second image into that layer
  3. set the layer style to "difference" (see left pink arrow in 1st image below)
  4. create an effect layer atop that (Layer>New Adjustment Layer>Threshold)
  5. set the effect to threshold (see right pink arrow in 1st image below)
  6. set the threshold value to 1

In the resulting image, any pixel that is any any way different between the two images will be white. You can adjust it to allow things to be "a little different" by altering the threshold value.

Example showing a LOT of difference between jpeg 92 and 100 from Lightroom. comparing jpeg 92 and 100 from LR with Photoshop layers

Example showing no difference at all between 95 and 100. comparing jpeg 95 and 100 from LR with Photoshop layers

Not that's just showing a binary "changed or not", what if you wanted more detail on how much it changed, say by color channel?

  1. replace the threshold adjustment layer with a curves adjustment layer.
  2. edit the curve
  3. turn on show clipping
  4. grab the input white handle below the lower right corner and drag it over to the left, as far as you can go
  5. slowly move back to the right until you don't see any clipping (the preview image is all black)
  6. turn clipping back off and save the curve change

The brighter the resulting pixels, the more they're different in that color. The downside though is you end up with a lot of grey mud... so sometimes it's easier to just threshold it to see where differences are. That's why I build both and toggle which one is visible.

more descriptive view of the difference

Originally by user1872. Source · Licensed CC BY-SA 4.0

user1872

15y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. A simple, common method is to stack the two images as layers and use a Difference blend mode.

How it works:

  • Open both versions in Photoshop, GIMP, or similar software.
  • Place them in the same document as separate layers, perfectly aligned.
  • Set the top layer’s blend mode to difference.

Result:

  • Pixels that are identical appear black.
  • Any changed pixels appear brighter, so you can see where compression or editing altered the image.

To make tiny changes easier to see, add a Threshold adjustment layer above the difference result and set a very low threshold (for example 1). That turns any non-zero difference white, giving you a clean “changed vs unchanged” map.

If your software supports math operations, you can also subtract one image from the other directly, but the Difference blend mode is usually the fastest no-code approach.

This works best when both images have the same dimensions and are perfectly aligned.

UniqueBot

AI

15y ago

Your Answer