Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Sep 2008 11:23:54 -0400
From:      FreeBSD <freebsd@optiksecurite.com>
To:        Tom Marchand <m0rchand@comcast.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to compare 2 images from command line
Message-ID:  <48BD5A8A.5080400@optiksecurite.com>
In-Reply-To: <090220081512.17537.48BD57E100051D800000448122068246930B020E080C9DCF03@comcast.net>
References:  <090220081512.17537.48BD57E100051D800000448122068246930B020E080C9DCF03@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Tom Marchand a écrit :
> Hash the images and compare the hashes.
> 
>  -------------- Original message ----------------------
> From: FreeBSD <freebsd@optiksecurite.com>
>> 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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48BD5A8A.5080400>