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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to