Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to subtract one image from another?

8,935 views
Skip to first unread message

Mercury

unread,
Nov 4, 2005, 1:17:58 AM11/4/05
to
I do apologize for what is most likely a dumb question, but I've been
searching for almost an hour in vain for the answer.

What I want to do is SUBTRACT one image from another i.e. mathematically
reduce the values of the pixels in one image by the values of the
corresponding pixels of the other image. I have no idea how to do this in
GIMP. I tried Googling this, but I only found references that it exists
under "channel ops" - whatever this "channel ops" is, I can't find it in my
copy.

I'm using 2.2.8.

I'd appreciate any help.


Joal Heagney

unread,
Nov 4, 2005, 9:23:12 AM11/4/05
to

Open up Gimp.
Open the two images.

On one image, select the following menu entry:

Layer -> New Layer
and click OK.

On the other image,
Select -> All
Edit -> Copy

Now back to the first image.
Edit -> Paste

Now go to the Layers Dialog (This should already be open, but you can
bring it up by selecting the menu entry Dialogs -> Layers)
You should see two ordinary layers, and a "floating layer". We need to
get that floating layer to stop floating. :) Look for a little anchor
icon at the bottom of the Layers dialog and click on that.

The number of layers should have changed to two. Select the top layer in
the Layers Dialog and look for an option called "mode". Change the mode
of the top layer to subtract or difference.

Subtract will mathematically subtract the top layer from the bottom
layer, and clip any negative values to zero.
Difference will mathematically subtract the top layer from the bottom
layer, and convert any negative values to the corresponding absolute value.

Hope that helps.

Also try the following web sites:

http://docs.gimp.org/en/
http://gimp-savvy.com/BOOK/index.html
http://authors.phptr.com/essential/gimp/section1.html

Joal Heagney

Mercury

unread,
Nov 4, 2005, 11:37:13 AM11/4/05
to
"Joal Heagney" <jhe1...@bigpond.net.au> wrote in message
news:k9Kaf.8683$Hj2....@news-server.bigpond.net.au...
> Hope that helps.

Bingo! Thanks a lot - that was exactly what I was looking for.

I'm new to GIMP, and I still have a lot to learn... thanks for the links,
too.


Joal Heagney

unread,
Nov 4, 2005, 10:41:16 PM11/4/05
to
You're welcome.
Happy gimping :)

Joal Heagney

0 new messages