Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

Compare two images

Bash solution needed



3:52 pm on Jan 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

In order to program a watchdog-timer for a perpetual screenshot, I need to compare the image content from the command line. Even with identical content, diff and cmp report that two consecutive files are different. So I need to look at the image content itself, best with some fuzzyness.

Any suggestions?


5:47 pm on Jan 10, 2007 (gmt 0)

5+ Year Member

When I use "md5sum" on binaries, it works pretty well in distinguishing two files...

except on java .class files. I found that even when the code changed, sometimes the compiled .class file was the same as before.



8:37 am on Jan 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Yes, I tried that too, but since the images DO differ on a binary basis (though not by visual inspection) md5sum gives of course different hashes.

I found a tool called jpegdiff which can get a "fuzziness parameter". Maybe this works.


Featured Threads

Hot Threads This Week

Hot Threads This Month