I noticed, that "difference" of two images looks very alike with Gimp's one
But "subtract" operation result is not even near Gimp's version. Is it possible somehow to do it the same way as Gimp does?
Gimp-like Subtract
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Gimp-like Subtract
At least for greyscale images, "MinusSrc" is the same as Gimp's "Subtract".
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Gimp-like Subtract
What command did you use in IM? What version of IM? What platform? Which way did you subtract them in GIMP? The issue is whether you did (image1 - image2) or (image2 - image1).
Subtract in IM for (image1 - image2) is done by (swapping the order of the two inputs if using convert and not swapping if you use composite)
convert image1 image2 +swap -compose minus -composite result
or
convert image2 image1 -compose minus -composite result
or using the old composite
composite -compose minus image1 image2 result
See
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/compose/#minus
Also in IM difference gives the absolute value of the difference. Not sure if you want that or not?
convert image1 image2 -compose difference -composite result
Subtract in IM for (image1 - image2) is done by (swapping the order of the two inputs if using convert and not swapping if you use composite)
convert image1 image2 +swap -compose minus -composite result
or
convert image2 image1 -compose minus -composite result
or using the old composite
composite -compose minus image1 image2 result
See
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/compose/#minus
Also in IM difference gives the absolute value of the difference. Not sure if you want that or not?
convert image1 image2 -compose difference -composite result