Hi all,
im looking for the fastest way to compare two picture-Files (e.g. bmp or jpg) with Perl. Is there a perl-specific command to realize this or do perl use only the normal operating-systems commands like "comp" or like. I only want to know is the file different or not. So may be the fastest command would be if the command stops immediately the comparison on the first difference and give immediately the result back.
I use Windows XP Pro and first i tried it with the XP- command "comp" (Code: `comp file1 file2`;). But the comp command always ask interactively for furter compare and i didnt find a way to avoid this. But bar of this is there a good perlcommand to do this work?
Thanks for any answer! Best regards michbach.

Ok, ive seen what in my mind is so clearly is in my question so ambiguous! Now here exact what i do. I make a screenshot of a certain desktop area and saved it as an jpg-file with name e.g. tested_1.jpg. After i while (e.g. 1 day) i make a screenshot again of the same desktop area and save it as an jpg-file with name tested_2.jpg. Now i want to know has file1 the same content as file2. So if the content the same nothing has changes on this desktop area! Is the content differnt something must changed on the desktop area. And i looking for the fastest was to do this under Perl. I dont want to bind in C-code or like. I hope i have declard it a littel bit better what i want. At last i wanna say thanks to all responders!

In reply to Fast way to compare two picture-files by michbach

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.