• 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: Getting Pixel values of an image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Pixel values of an image


  • Subject: Re: Getting Pixel values of an image
  • From: Andrew Zamler-Carhart <email@hidden>
  • Date: Wed, 15 Dec 2004 12:32:46 +0000

Dear Anish,

You can call -lockFocus on the image, and then use NSReadPixel().

	NSPoint point = NSMakePoint(x, y);
	NSColor *colorAtPoint;

	[image lockFocus];
	colorAtPoint = NSReadPixel(point);
	[thumbnail unlockFocus];

Best regards,

Andrew
KavaSoft

On Dec 15, 2004, at 6:33 AM, Anish Kumar wrote:

Can anyone please tell me how to get the pixel value of an image. I mean to say that the
pixel values should be same for a particular position in the image irrespective of the how
much the image isĀ  zoomed.


 thanks in advance,
 -Anish


<inbox.gif> _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Getting Pixel values of an image (From: "Anish Kumar" <email@hidden>)

  • Prev by Date: Re: one document at a time
  • Next by Date: Re: Substituting low level BSD stuff with spiffy Cocoa calls
  • Previous by thread: Getting Pixel values of an image
  • Next by thread: Re: Getting Pixel values of an image
  • Index(es):
    • Date
    • Thread