I am looking for a way to get the Bitwise XOR of two images on the command line(or in another way that can be implemented in a program or script).
This should result in
Knowing that
A XOR B = (A AND NOT B) OR (NOT A AND B).
and that most of common image processing tools do have and, or and not operations the rest is quite easy :)
Working in Python, you could have a simple script performing the operation and even adding it as a plugin in the gimp ;)