### Simple subtract

Posted:

**2010-05-25T06:05:44-07:00**Hi there,

I'm not very much into image processing. But I'm very interested in solving my current issue with ImageMagick.

I want to subtract B.gif

from this image A.gif

So, only the white, dark blue and green pixels should be left. Like this:

But applying
results in

and
results in

It looks so me so simple. But the first result seems to be a combination of A and B, whereas the last result looks promising if the coloured pixels would have been copied out of A.

Any help is much appreciated!

Thanks,

Ralf

I'm not very much into image processing. But I'm very interested in solving my current issue with ImageMagick.

I want to subtract B.gif

from this image A.gif

So, only the white, dark blue and green pixels should be left. Like this:

But applying

Code: Select all

`composite -compose subtract A.gif B.gif C.gif`

and

Code: Select all

`composite -compose subtract B.gif A.gif C.gif`

It looks so me so simple. But the first result seems to be a combination of A and B, whereas the last result looks promising if the coloured pixels would have been copied out of A.

Any help is much appreciated!

Thanks,

Ralf