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
I found a need for xor
on an image and the G'MIC tool works for me. G'MIC is incredibly powerful, as is Image Magick, but worth a look for solving some tough image processing problems.
gmic a.png b.png -blend xor -o result.png
G'MIC also works directly on the images posted above.
gmic http://i.stack.imgur.com/Ws6e8.png http://i.stack.imgur.com/hoBIM.png -blend xor -o result.png
For help,
gmic -h -blend