I have a whole lot (thousands) of 'original' images which look something like this:

Each image has a unique filename.
I have an equivilent set of 'toremove' images which contain data which I need to remove from the original images. The one which matches the example above looks like this:

all of these images are blue and so don't match the colours in the original. I need to perform the operation
destination.png = original.png - toremove.png
hence my destination file for the above should look like this:

BUT... I'm performing this operation:
Code: Select all
composite "Original.png" "ToRemove.png" -compose dst_out "Destination.png"

So I'm not quite there - look carefully any you will see the 'ghost' of the removed data where some of the pixels remain. I also see that my image appears to have gained a white background and I'm not sure why that is happening. Can someone give me a command line instruction which will give me the desired result?
Thanks!
Barry.