How to compare 2 images from command line

DA Forsyth iwrtech at
Wed Sep 3 08:34:36 UTC 2008

On 2 Sep 2008 , freebsd-questions-request at entreated about
 "freebsd-questions Digest, Vol 231, Issue 5":

> > 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
> 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, 
> by now, it doesn't work because every tool we try is seeing a diffence 
> between 2 identical images.

JPG format will always be different because of the 
encoding/compression.  I think you need to save to an uncompressed 
format like BMP.  Maybe PNG has a mode that will work too.  BMP has 
no info headers, just the raw data, so that won't be affected by the 
time of the save (at the least).

       DA Fo rsyth            Network Supervisor
Principal Technical Officer -- Institute for Water Research

More information about the freebsd-questions mailing list