From owner-freebsd-questions@FreeBSD.ORG Tue Sep 2 15:28:34 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 3AC67106567E for ; Tue, 2 Sep 2008 15:28:34 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by mx1.freebsd.org (Postfix) with ESMTP id 0C04C8FC21 for ; Tue, 2 Sep 2008 15:28:33 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3257192rvf.43 for ; Tue, 02 Sep 2008 08:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=m5/y2GZgU9Pkg+5+GDeE+ZZY+qhuAoanbDF0aqQPpmk=; b=KPW0xXhzzRJcY2SsrpI2KiAhTQG33sp/UqPZr1fcOq7VF2Mt3AJf8b/gRRAZXL1y6R Z315zYG+Jo8QEiMbh73oJqRwbm8oNyLpa+Gda4i9Dk+WgboVqQiJaeh+BG1Cp1iWqzgA /To9pq7QbZioiWH0Wg1CaQiB76ERgYhjxpKNo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=X+LrTrZqIhW7LWSwqT7qHDu3ROXwkN8GzVPv67FkeiXDzxkE4lCY7jMT7cEyigg0zm QMFF55NOntuQAs8px92IOBWyyi2bI4lsvYyn2LqnGV3s01ejF43Tu6dpVn+5gENj+ysL WJk5SQ6vi0skPtCCRZYDHqfsVDlLRwsWkwtqg= Received: by 10.141.18.15 with SMTP id v15mr4214511rvi.296.1220369313605; Tue, 02 Sep 2008 08:28:33 -0700 (PDT) Received: by 10.141.87.10 with HTTP; Tue, 2 Sep 2008 08:28:33 -0700 (PDT) Message-ID: Date: Tue, 2 Sep 2008 10:28:33 -0500 From: "Andrew Gould" To: FreeBSD In-Reply-To: <48BD5A8A.5080400@optiksecurite.com> MIME-Version: 1.0 References: <090220081512.17537.48BD57E100051D800000448122068246930B020E080C9DCF03@comcast.net> <48BD5A8A.5080400@optiksecurite.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Tom Marchand , 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:28:34 -0000 On Tue, Sep 2, 2008 at 10:23 AM, FreeBSD wrote: > Tom Marchand a =E9crit : > >> 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 i= f 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 th= e >>> 'compare' command from imagemagick, but it produce an image containing = the >>> difference between the 2 images instead of telling me if both images ar= e >>> 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 > Yes, there's a huge difference between testing differences in images and testing differences in files. What do you mean by "...know if the display is working correctly."? Andrew