title: OS X: Comparing two images
body: <p>I'm trying to implement a way to compare two images but I'm testing my and comparing the same image to make sure is working but doesn't work. here is may code:</p>
  
  <pre><code>NSImage *file = [[NSImage alloc] initWithContentsOfFile:path];
  NSData *imgDataOne = [file TIFFRepresentation];
  NSData *imgDataTwo = [file TIFFRepresentation];
  
  if (imgDataOne == imgDataTwo)
  {
      NSLog(@"is the same image");
  }
  </code></pre>
  
  <p>The if is never true. Any of you knows what I'm doing wrong or if another way to compare the images?</p>
  
  <p>I'll really appreciate your help.</p>