Re: Cannot get pixel color from NSBitmapImageRep
Re: Cannot get pixel color from NSBitmapImageRep
- Subject: Re: Cannot get pixel color from NSBitmapImageRep
- From: David Hirsch <email@hidden>
- Date: Thu, 01 Oct 2009 08:12:20 -0700
Jonathan, Dave-
Nothing works yet. Dave's NSLog statement prints
"NSCalibratedRGBColorSpace 0 0 0 0", and restoring the graphics
context does not help the problem. Still stumped.
-Dave
This is just as guess, but perhaps there's an issue with the drawing
not being completed and flushed back to the bitmap buffer. Have you
tried restoring the graphics context prior to querying for the pixel
value?
-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