Hi:
I would like my script to compare two images and tell me if even one single pixel is slightly different in one of them. Also tell me if its width or height is different too.
Is there a library which already does this..??
I know about the file test operators. (-T for text files, -B for Binary, -s for size, -M last modified in days, -A last accessed in days), but I havent found any operator which can tell me if the pixels or width or height have been changed.
So far, besides using the test operators above, I'm opening both binary files , reading them into memory and comparing the output... but ofcourse this is not good enough I need better suggestions.
open (IMAGE1, "<image1.jpg") || die print"cant open image1.jpg"; $results1 = <IMAGE1>; close (IMAGE1); open (IMAGE2, "<image2.jpg") || die print"cant open image2.jpg"; $results2 = <IMAGE2>; close (IMAGE2); if ($results1 eq $results2){ print"both images are the same"; }
If you can help.. I'll appreciate it
In reply to Matching Images by virtualweb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |