On Monday 10 August 2009 08:42 am, Doriano Blengino wrote: > There is a program called GQView (and probably others) which have > algorithms to compare two images in the right way - ie scale them to > same size, compress colors and normalize them, then compare pixel by > pixel using a good tolerance. > I did something similar, it is a pascal source (if I only remember > where I put it); or you can download those sources and look into them (C > sources, I suppose).
I did the same thing in Perl about 9 years ago, circa Mandrake 7. Don't know if it would even run with current versions of everything, and it's heavily dependent on Imagemagick for the normalizing, but here it is: http://www.kudla.org/raindog/perl/ (see findimagedupes, the first entry on that page) Also includes someone else's C++ implementation of the comparison function which sped it up by several orders of magnitude. But if both pictures are guaranteed to be the same size, something as simple as converting each one to text-based PPM format and using diff should be sufficient. Rob ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user