Re: How to read pixel values of monochrome images
Re: How to read pixel values of monochrome images
- Subject: Re: How to read pixel values of monochrome images
- From: "John C. Randolph" <email@hidden>
- Date: Sat, 23 Aug 2008 20:55:11 -0700
On Aug 23, 2008, at 2:51 PM, Shawn Erickson wrote:
On Fri, Aug 22, 2008 at 2:54 AM, Eduardo Areitio <email@hidden> wrote:
I'm trying to read individual pixel values in a monochrome image
using
NSReadPixel, but I haven't been able to.
I would much appreciate anyone's help
It is usually best to post some code or better explain what you tried
and what is going wrong otherwise we have to guess at the difficulty
you are having.
Anyway...
http://developer.apple.com/samplecode/Color_Sampler/listing5.html
You'll notice from the comments in that sample, that NSReadPixel()
gets a value from the graphics context that has the current drawing
focus. If you're trying to read a value from an image, you've got to
have somewhere to draw it first.
-jcr
_______________________________________________
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