If the images are layered on top of each other, then what does the difference look like? Both of the images, blended together?
That part seems simple enough. Load the images using something like pillow (
https://python-pillow.org/), set the alpha channel of both to 50%, and overlay them both to the same output file.
Outline differences would mean thinking a little bit about what an image is. For raster images, it's a collection of points/pixels, that have color values. For vector images... you'd probably want to just convert them to raster images before attempting a comparison. Then you'd iterate over each pixel in both files to find differences.
Things to think about:
- if one image is different from the other, but only by a few shades of red (so the difference is not noticeable), would that get outlined?
- if a handful of pixels next to each other are all different, are each of them outlined individually, or is the entire region given one big outline?