• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Comparing NSImages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comparing NSImages


  • Subject: Re: Comparing NSImages
  • From: Benjamin Rister <email@hidden>
  • Date: Fri, 24 Jul 2009 12:11:32 -0400

On Jul 23, 2009, at 5:19 PM, Nick Zitzmann wrote:
Considering that there are several different variations on the TIFF file format (e.g. big-endian vs. little-endian, 0 is black vs. 1 is black, and then there's metadata), this would not surprise me.

Yeah, that's what I expected, thanks.


On Jul 23, 2009, at 5:39 PM, Greg Guerin wrote:
Subtract the test's output image from the reference image, pixel by pixel, and look for any non-zero differences. This assumes compatible representations and no differences introduced by any other image-handling steps (e.g. device-RGB is device-dependent, so can't be assumed to be unvarying).

Even so, you might encounter small non-zero differences that originate from outside your code-under-test. If these are larger than +/-1 they could be significant; +/-1 I'd probably accept as within the margin-of-error for rounding.

Thanks, I didn't know if there was a cleaner way than doing it pixel- by-pixel myself; the info on reasonable tolerances is also quite helpful.



I've tracked down the problem using this method (unfortunately, can't yet write about the issue here for the archives); thanks to everybody for their help.


Benjamin Rister
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Comparing NSImages (From: Benjamin Rister <email@hidden>)
 >Re: Comparing NSImages (From: Sandy McGuffog <email@hidden>)

  • Prev by Date: Re: When saving the managed object context
  • Next by Date: Re: Text is flipped vertically
  • Previous by thread: Re: Comparing NSImages
  • Next by thread: Re: Comparing NSImages
  • Index(es):
    • Date
    • Thread