• 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: Cannot get pixel color from NSBitmapImageRep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot get pixel color from NSBitmapImageRep


  • Subject: Re: Cannot get pixel color from NSBitmapImageRep
  • From: Dave Keck <email@hidden>
  • Date: Wed, 30 Sep 2009 22:40:52 -1000

>        float r,g,b,a;
>        [pixelColor getRed:&r green:&g blue:&b alpha:&a];

-getRed:... accepts CGFloats as arguments, not floats. Depending on
your architecture, you're supplying a pointer to an incorrectly-sized
variable, and the bug you're seeing is the result of this error.

If you NSLog(@"%@", pixelColor); you'll see that the color is in fact correct.
_______________________________________________

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

  • Follow-Ups:
    • Re: Cannot get pixel color from NSBitmapImageRep
      • From: David Hirsch <email@hidden>
References: 
 >Cannot get pixel color from NSBitmapImageRep (From: David Hirsch <email@hidden>)

  • Prev by Date: Re: [iPhone] Application running for the very first time...
  • Next by Date: Re: [iPhone] Application running for the very first time...
  • Previous by thread: Re: Cannot get pixel color from NSBitmapImageRep
  • Next by thread: Re: Cannot get pixel color from NSBitmapImageRep
  • Index(es):
    • Date
    • Thread