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

Re: [Enigmatic semi-solution] Re: Cannot get pixel color from NSBitmapImageRep


  • Subject: Re: [Enigmatic semi-solution] Re: Cannot get pixel color from NSBitmapImageRep
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Thu, 01 Oct 2009 19:36:20 -0700


On Oct 1, 2009, at 11:19 AM, Ken Ferry wrote:

Hi David,
Oh, yes, you're right. In the bitmapData, the first row is the top row.
-getPixelAtX:y:, -setPixelAtX:y:, -getColorAtX:y: and setColorAtX:y: are
the same. The first row is the top. Sorry that's confusing.

It might be nice if this was documented :). I filed a bug report on it 2-1/2 years ago, after experiencing similar frustration and confusion of flippedness (rdar://problem/5222982).


We don't recommend poking at the pixels of an NSBitmapImageRep, but if
you're going to and you aren't just poking one pixel, you're better off
using a bulk interface. Message dispatch overhead is too high a proportion
of the work to be done with the one-by-one approach.

Performance of getPixelAtX:y: was too abysmal to use, so I've never gone back to it. IIRC most of the overhead was in CG acquiring a lock and finding the image in a dictionary, but that was a while ago.



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >Cannot get pixel color from NSBitmapImageRep (From: David Hirsch <email@hidden>)
 >Re: Cannot get pixel color from NSBitmapImageRep (From: Dave Keck <email@hidden>)
 >Re: Cannot get pixel color from NSBitmapImageRep (From: David Hirsch <email@hidden>)
 >[Enigmatic semi-solution] Re: Cannot get pixel color from NSBitmapImageRep (From: David Hirsch <email@hidden>)
 >Re: [Enigmatic semi-solution] Re: Cannot get pixel color from NSBitmapImageRep (From: Ken Ferry <email@hidden>)

  • Prev by Date: Re: Releasing NSSearchPathForDirectoriesInDomain causes crash
  • Next by Date: converting a NSView into an NSImage, when scaling via scaleUnitSquareToSize ...
  • Previous by thread: Re: [Enigmatic semi-solution] Re: Cannot get pixel color from NSBitmapImageRep
  • Next by thread: Re: NSApplication's behavior
  • Index(es):
    • Date
    • Thread