From owner-freebsd-questions@FreeBSD.ORG Tue Sep 2 15:24:35 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B7EB106567D for ; Tue, 2 Sep 2008 15:24:35 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) Received: from tomts27-srv.bellnexxia.net (tomts27.bellnexxia.net [209.226.175.101]) by mx1.freebsd.org (Postfix) with ESMTP id CAC468FC1B for ; Tue, 2 Sep 2008 15:24:34 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) Received: from toip36-bus.srvr.bell.ca ([67.69.240.37]) by tomts27-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20080902152433.LVRI5613.tomts27-srv.bellnexxia.net@toip36-bus.srvr.bell.ca>; Tue, 2 Sep 2008 11:24:33 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAPv2vEhKD7BS/2dsb2JhbAC0EoFp Received: from mtrlpq02-1242542162.sdsl.bell.ca (HELO [69.69.69.183]) ([74.15.176.82]) by toip36-bus.srvr.bell.ca with ESMTP; 02 Sep 2008 11:24:19 -0400 Message-ID: <48BD5A8A.5080400@optiksecurite.com> Date: Tue, 02 Sep 2008 11:23:54 -0400 From: FreeBSD User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Tom Marchand References: <090220081512.17537.48BD57E100051D800000448122068246930B020E080C9DCF03@comcast.net> In-Reply-To: <090220081512.17537.48BD57E100051D800000448122068246930B020E080C9DCF03@comcast.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: How to compare 2 images from command line X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2008 15:24:35 -0000 Tom Marchand a écrit : > Hash the images and compare the hashes. > > -------------- Original message ---------------------- > From: FreeBSD >> Hi everyone, >> >> I'm trying to determine if 2 jpeg images are identical. The images are >> screenshots taken with scrot at different times. The point is to know if >> the display is working correctly. I tried to use 'diff' but without >> success, probably because of the metadata included in the image. I also >> tried the 'compare' command from imagemagick, but it produce an image >> containing the difference between the 2 images instead of telling me if >> both images are identical. >> >> So, my question is what are you using to determine if 2 images are >> identical? >> >> I'm using FreeBSD 7.0 and I need to be able to script this comparaison >> for an integration in Nagios. >> >> Thank you, >> >> Martin I just tried it and it doesn't work. The hashes are different. I can't say that I'm surprised since 'diff' is "seeing" a difference between the two identical images. Thanks for the suggestion