From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JJBt6-0002Pd-DU for garchives@archives.gentoo.org; Sun, 27 Jan 2008 18:06:14 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37D59E0552; Sun, 27 Jan 2008 18:05:47 +0000 (UTC) Received: from Princeton.EDU (postoffice05.Princeton.EDU [128.112.131.199]) by pigeon.gentoo.org (Postfix) with ESMTP id DA2C9E0552 for ; Sun, 27 Jan 2008 18:05:46 +0000 (UTC) Received: from smtpserver1.Princeton.EDU (smtpserver1.Princeton.EDU [128.112.129.65]) by Princeton.EDU (8.13.8/8.13.8) with ESMTP id m0RI5kWq029770 for ; Sun, 27 Jan 2008 13:05:46 -0500 (EST) Received: from sep.dynalias.net (fez.Princeton.EDU [128.112.129.190]) (authenticated bits=0) by smtpserver1.Princeton.EDU (8.12.9/8.12.9) with ESMTP id m0RI5jGu025131 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Sun, 27 Jan 2008 13:05:45 -0500 (EST) Received: by sep.dynalias.net (Postfix, from userid 1001) id 04B41A5638; Sun, 27 Jan 2008 13:07:20 -0500 (EST) Date: Sun, 27 Jan 2008 13:07:20 -0500 From: Willie Wong To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] diff command for images Message-ID: <20080127180720.GB8344@princeton.edu> Mail-Followup-To: gentoo-user@lists.gentoo.org References: <479C8D07.2040508@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <479C8D07.2040508@gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Archives-Salt: 1b5b8112-f3bf-437e-b098-1324bca8a4e6 X-Archives-Hash: 29d6dc27d86dba8630178171498daecd On Sun, Jan 27, 2008 at 02:54:15PM +0100, Penguin Lover Erik squawked: > I need to find the difference between images (like the text-file diff > command, but for RGBA images). I tried "compare A.png A.png > difference.png". This should obviously produce some kind of blank image > because A.png and A.png are the same file, but for some weird reason the > produced difference.png has recognizable content! Is there a fix for > that bug or any other image diff program that is sane? It seems that you do not understand how the compare function works http://www.imagemagick.org/script/compare.php The output image is the second image overlaid with a red "mask". The pixels that are tinted red in the output shows the pixels that differ from the original one. The ones that are not tinted red are unchanged. So if you compare A to A, you will get something that looks like A tinted by white. What you want is something like composite A.jpg -compose minus A.jpg Out.jpg Look at http://www.imagemagick.org/script/command-line-options.php#compose to see what composite operators you can use for doing the comparison. W -- Heineken (/hnkt/)... since the second millennium B.C., middle kingdom. ' ' Sortir en Pantoufles: up 415 days, 16:27 -- gentoo-user@lists.gentoo.org mailing list