How to compare 2 images from command line

Julien Cigar jcigar at
Tue Sep 2 15:13:52 UTC 2008

/sbin/md5 image1.ext image2.ext ?

On Tue, 2008-09-02 at 11:02 -0400, FreeBSD wrote:
> 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
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"
Julien Cigar
Belgian Biodiversity Platform
Université Libre de Bruxelles (ULB)
Campus de la Plaine CP 257
Bâtiment NO, Bureau 4 N4 115C (Niveau 4)
Boulevard du Triomphe, entrée ULB 2
B-1050 Bruxelles
Mail: jcigar at
Tel : 02 650 57 52

More information about the freebsd-questions mailing list