Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - CompareBMP

Posted in WinTask

' 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:\file1.bmp c:\file2.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



Any comments on this article?
Email Me


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now