How can I tell exactly what changed between two images?
For example, for a recent conversation about JPEG compression I wanted to compare pixel for pixel what changed between two JPEGs (one with compression level 100, and one with compression level 95).
How do I generate good visual maps of what changed without tedious custom software programing?
Not submitting this as an answer as it's probably not a viable solution for photos, but GitHub (a programmer's site) has some interesting ways of comparing images: https://github.com/cameronmcefee/Image-Diff-View-Modes/commit/8e95f70c9c47168305970e91021072673d7cdad8 Try clicking "2-up", "Swipe", "Onion Skin" and "Difference".
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.
- create a new layer atop it
- paste the second image into that layer
- set the layer style to "difference" (see left pink arrow in 1st image below)
- create an effect layer atop that (Layer>New Adjustment Layer>Threshold)
- set the effect to threshold (see right pink arrow in 1st image below)
- 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.
Example showing no difference at all between 95 and 100.
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?
- replace the threshold adjustment layer with a curves adjustment layer.
- edit the curve
- turn on show clipping
- grab the input white handle below the lower right corner and drag it over to the left, as far as you can go
- slowly move back to the right until you don't see any clipping (the preview image is all black)
- 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.