Looking for a good Diff Utility

TheAutomator

Newcomer
'lo everyone.

I've been asked to work on some automation tools to compare screen captures of a 3D application. The diff utility I am using right now is very basic, it only spits out a bitmap with the difference onscreen. Useful for visual comparison, not so great for automation. My internet searches have come up with a lot of similar utilities, however, I am looking for something that can do the following:

- Compare two images and report if they are the same (0) or different (1) in a pop up window or text file output.
- If they are different, report a percentage of difference (not sure how this would be weighted, but basically I need some fuzzyness here to give a passing mark even if a handfull of pixels are slightly off between builds).
- Output diff image to a bitmap file.

I seem to recall using a tool that did this a long time ago, but trying to track it down on google is proving to be difficult (diff and bitmap get a lot of hits). Any suggestions?
 
This probably won't be very helpfull, but it doesn't seem very difficult to program that either under .Net or with ImageMagick. I know of no pre-made utility to do that (although I would love to).

On second thought, have you tried with a mere batch file ? For your first point, fc.exe probably returns a usable return code, and for the third one something like photoshop or Gimp probably can be used programmatically to diff a picture, right ? (Btw, Gimp uses a scripting language derived from Scheme and its scripting capabilities are quiet good - maybe you'll find all you're looking for in there). For your 2nd point, a difference evaluation with some fuzzyness, you might try this but I have no idea on how to integrate that into your pipe...
 
Last edited by a moderator:
_xxx_ - Yea, I use Beyond Compare for my files, directory and text comparisons. I don't recall any specific bitmap comparison functionality though, nor command line options... I'll toy around with it a bit this afternoon, maybe it will surprise me.

Remi - I had forgotten about fc.exe, that should work for the inital compare. And thanks for the link to VS Duplicate Image finder, this may be just the ticket I am looking for. They do provide command line functionality, but only for the corporate version ($499 vs $29) so I shot them an e-mail to see why they have such insane restrictions. Otherwise I may try to automate loading two images and grab the percent difference information from the GUI instead. Thanks!
 
You may want to check out the image-diffing functionality in The Compressonator. It currently has command line support for starting in diff files or diff directories mode but no support for diffing purely in command line mode. It is free so you could always try to automate grabbing the difference info from the GUI or nag me to add the support you need ;)

GP.
 
It seems like you would be best rolling your own.
It should only be a mornings work.

That way you will also know exactly how the weighting for the 'slightly different' images thing works.

I realise this isn't exactly what you were looking for, but I beleive it would be your best option.

CC
 
Back
Top