I want to subtract two images from each other but cannot deterine what command-line is appropriate. I want the opaque regions of a mask image to be removed from another image.
minus
equals
I have this command-line which works with the above:
Code: Select all
convert -channel Alpha -compose subtract -composite circle.png square.png -write mpr:orig +delete \
-channel RGB -compose add -composite mpr:orig square.png output.png
However, the moment the mask is smaller, like this
, the target image is also smaller. I want to keep the source images size. I would then use some kind of geometry command to offset the mask into the larger one.