So I've got two images that are almost identical. The colours of one image have been slightly modified. I want to get these differences. Original image has a pixel value 200, modified image has pixel value 205, I want output to have 5. The direction doesn't matter, just the absolute difference (205 becoming 200 still should be 5). If the pixels are identical the output should be 0 (0-0 = 0, 255-255=0)
I thought that "compare -compose difference" would do this but the result isn't what I expected. I know the images are mostly identical except for a scattering of pixels, but I'm seeing differences in the output across the entire thing. As a test I even compared the image against itself expecting solid black output, but it did not.
Consider this example:
solid black bitmap

compare -compose difference black.bmp black.bmp black_diff.bmp
grey output

I also tried the same thing with a redish square (181,52,52) which produced teal output (95, 173, 173), then did a self difference on the teal square to get a kind of taupe (147, 100, 100), and then for good measure made duplicates of the images in case there's some problem with comparing a file directly against itself. I also tried "minus" and "subtract" and "exclusion" to no avail.
What am I misunderstanding? Is there a way to actually do what I want? If the two images are identical the output should be solid black.
"-compose src" does what I expect, showing me only the exact pixels that are different, but I want a little more information, the exact differences between those pixels.
Thanks for listening.