From owner-freebsd-questions@FreeBSD.ORG Tue Sep 2 16:02:31 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 587871065673 for ; Tue, 2 Sep 2008 16:02:31 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by mx1.freebsd.org (Postfix) with ESMTP id 11B768FC1D for ; Tue, 2 Sep 2008 16:02:30 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: by py-out-1112.google.com with SMTP id p76so1251468pyb.10 for ; Tue, 02 Sep 2008 09:02:29 -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=2q39FLv5o1aAP34p0dSIxyeomXg4n1a2F+FPEAHpo6k=; b=I2s3i86cAwomQY8AnTtO+zJinpKpz6KJTDs17db21r0gx8abjzFtegamgo6NeYBllo kjAtN43NV7TlaOPPrzvcIVWMhJoxKHC5QxlGYpp8fLlFR7g1vaOE39JeCurNljfUAX2I K+gaUJ7ek3ho4zbFLrZk0gxs1QgefBO2YgLXU= 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=rbcsVUcTpaTsX7bU15z9nU+p6RLP5xDLv9AgheL+uzLdUl4Au+Rm7KMkQZXopKBVLd /bM/pRRNRSn+5ur3TpZcERj6Ho+/1o0eb/Dks/Le+fOTy7Qu3EnI3GUl3HBQjx5be04X 3xNN7cOQCnEuAjjQV/jn+Sw6svIPUZ74OoX/4= Received: by 10.141.211.13 with SMTP id n13mr4289775rvq.12.1220371349184; Tue, 02 Sep 2008 09:02:29 -0700 (PDT) Received: by 10.141.87.10 with HTTP; Tue, 2 Sep 2008 09:02:29 -0700 (PDT) Message-ID: Date: Tue, 2 Sep 2008 11:02:29 -0500 From: "Andrew Gould" To: FreeBSD In-Reply-To: <48BD5C65.9030502@optiksecurite.com> MIME-Version: 1.0 References: <090220081512.17537.48BD57E100051D800000448122068246930B020E080C9DCF03@comcast.net> <48BD5A8A.5080400@optiksecurite.com> <48BD5C65.9030502@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 16:02:31 -0000 On Tue, Sep 2, 2008 at 10:31 AM, FreeBSD wrote: > Andrew Gould a =E9crit : > >> >> >> On Tue, Sep 2, 2008 at 10:23 AM, FreeBSD > freebsd@optiksecurite.com>> 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 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 >> >> >> Yes, there's a huge difference between testing differences in images and >> testing differences in files. What do you mean by "...know if the displ= ay >> is working correctly."? >> >> Andrew >> > > I want to determine if Mplayer is working correctly. The best way to be > sure is to check if the display on the screen is changing. That's the > purpose of the screenshots. The screenshots are taken by Nagios every 5 > minutes and the new screenshot is compared with the preceding one. But, b= y > now, it doesn't work because every tool we try is seeing a diffence betwe= en > 2 identical images. > > Thank you for your interest > Are you simply trying to determine whether the mplayer has finished playing a movie (that you're not watching)? It seems to me that the fact that the image changes is not a good indication that mplayer is "working correctly", only that the movie isn't running.