Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 2008 02:17:55 +1000
From:      andrew clarke <mail@ozzmosis.com>
To:        FreeBSD <freebsd@optiksecurite.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to compare 2 images from command line
Message-ID:  <20080902161755.GA99236@ozzmosis.com>
In-Reply-To: <48BD626F.6000401@optiksecurite.com>
References:  <090220081512.17537.48BD57E100051D800000448122068246930B020E080C9DCF03@comcast.net> <48BD5A8A.5080400@optiksecurite.com> <d356c5630809020828y1e4bf347k7725857a4ceaa761@mail.gmail.com> <48BD5C65.9030502@optiksecurite.com> <20080902114639.f06b082a.wmoran@potentialtech.com> <48BD626F.6000401@optiksecurite.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue 2008-09-02 11:57:35 UTC-0400, FreeBSD (freebsd@optiksecurite.com) wrote:

>> Can you put the screenshots into some other format?  As you mentioned,
>> the jpeg format includes metadata, which might include the creation
>> time and would cause every image to be unique from a filesystem view.
>> For example, I don't believe bitmaps include metadata, which would cause
>> them to be identical if the display were identical.
>
> Thank you! It did the trick. I just converted the image from png (sorry  
> it wasn't jpeg...) to bmp and it works with cmp. Even diff now recognize  
> both images as identical.

Before I read this I was going to suggest you could try removing the
metadata using something like jhead.  As it turns out, you say you're
using PNG format images, not JPEGs, but perhaps there's an equivalent
to jhead to work with metadata in PNG files - just as an
alternative to converting each PNG to BMP (which could be CPU intensive).

Regards
Andrew



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