• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

Tiff File Comparisions

How to compare 2 tiff files for there equality

I want to check whether to Tiff files are same or not

Reply me Immediately .
Thanks in advance

0
rajanb
Asked:
rajanb
1 Solution
 
mcriderCommented:
What about just opening the two files in binary mode and comparing them byte-by-byte as you read them?


Cheers!
0
 
JimOliverCommented:

This works, but if the files are off by one pixel they will be marked as different.

  Dim strTif1 As String * 32768
  Dim strTif2 As String * 32768
  Dim bolDifferent As Boolean
 
  Open "d:\test1.tif" For Binary Access Read As #1
  Open "d:\test2.tif" For Binary Access Read As #2
 
  Do
    Get #1, , strTif1
    Get #2, , strTif2
   
    If strTif1 <> strTif2 Then
      bolDifferent = True
      Exit Do
    End If
 
  Loop Until EOF(1)
 
  Close #1
  Close #2
 
  If bolDifferent Then
    MsgBox "different"
  Else
    MsgBox "same"
  End If
0
 
LeXienCommented:
or by just checking the CRC32 checksum of each file - then if they are the same CRC32, the files are the same - if the CRC32 is different - they are different.
I'm doubt this is what you mean, but anyway...

thanks
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now