January 1, 2005

WinTask - CompareBMP

' CompareBMP - Compare two bitmaps
'
' Author: Joe Strazzere
'
' Compare two bitmaps by SHELLing out to a CMD line
' and executing the Windows FC /B command
'
' Direct the output to a text file, then examine the file
' It you see "no differences encountered" in the file,
' then the images are the same.
' Otherwise, the images are not the same.
'

ret=shell("CMD /c "+Chr$(34)+"FC /b c: ile1.bmp c: ile2.bmp >c:output.txt"+Chr$(34),1)
Read("c:output.txt",Answer$)

If Instr(Answer$,"no differences encountered") = 0 then
    MsgBox("The BMP files do not match")
Else
    MsgBox("The BMP files match")
EndIf