Gentoo Archives: gentoo-user

From: Willie Wong <wwong@×××××××××.EDU>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] diff command for images
Date: Sun, 27 Jan 2008 18:06:14
Message-Id: 20080127180720.GB8344@princeton.edu
In Reply to: [gentoo-user] diff command for images by Erik
1 On Sun, Jan 27, 2008 at 02:54:15PM +0100, Penguin Lover Erik squawked:
2 > I need to find the difference between images (like the text-file diff
3 > command, but for RGBA images). I tried "compare A.png A.png
4 > difference.png". This should obviously produce some kind of blank image
5 > because A.png and A.png are the same file, but for some weird reason the
6 > produced difference.png has recognizable content! Is there a fix for
7 > that bug or any other image diff program that is sane?
8
9 It seems that you do not understand how the compare function works
10 http://www.imagemagick.org/script/compare.php
11
12 The output image is the second image overlaid with a red "mask". The
13 pixels that are tinted red in the output shows the pixels that differ
14 from the original one. The ones that are not tinted red are unchanged.
15 So if you compare A to A, you will get something that looks like A
16 tinted by white.
17
18 What you want is something like
19
20 composite A.jpg -compose minus A.jpg Out.jpg
21
22 Look at
23 http://www.imagemagick.org/script/command-line-options.php#compose
24
25 to see what composite operators you can use for doing the comparison.
26
27 W
28 --
29 Heineken (/hnkt/)... since the second millennium B.C., middle kingdom.
30 ' '
31 Sortir en Pantoufles: up 415 days, 16:27
32 --
33 gentoo-user@l.g.o mailing list