richard terry ha scritto: > Hi all, > > i wondered if anyone could tell me how to comparea picture1 to picture 2 and > tell if they were different (ie one had been changed in some way? > This is very difficult, if your images are slightly different but a human would say they are the same.
I explain better. If two images differ by only one pixel, then a binary comparison fails. So a binary comparison can not work, unless you know your two images should be *exactly* the same (I think no...) 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). My algorithm works well enough if the images are about the same, but it is fooled if one image has a colored frame around and the other not, or if one image is contained in the other, or one is a shifted version of the other, and so on. May be that GQView has better way to recognize. But I repeat, it is difficult and CPU demanding, perhaps too much for an interpreted language. Regards, Doriano ------------------------------------------------------------------------------ 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