Searching for a way to do Bitwise XOR on images

前端 未结 6 1639
Happy的楠姐
Happy的楠姐 2021-01-31 09:42

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

6条回答
  •  粉色の甜心
    2021-01-31 10:32

    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
    

提交回复
热议问题