> The following code always returns false:
yes because you are checking if the 2 pictures are identical not only in
size but also as image , if there is one bit different set it will return
false although you might not see it with the naked eye
but what you want checking the size can you easily do with a custom function
< not behind my dev pc modus so check for typo`s >
private function ImgCheckSameSize(byval ImageA as image , ImageB as image )
as boolean
if (ImageA.Width = ImageB.Width) AndAlso ( ImageA.Height=ImageB.Height)
then
return true
end if
end function
regards
Michel Posseth [MCP]
"Saber" <saber[.AT.]oxin.ir> schreef in bericht
news:%2****************@TK2MSFTNGP03.phx.gbl...
There are some Images (System.Drawing.Image) with same widths and heights,
I want to find if 2 images are equal.
How can I do it?
The following code always returns false:
If img1.Equals(img2) Then
MsgBox("ok!")
Else
MsgBox("wrong!")
End If