I have created an NSImage object, and ideally would like to determine how many of each pixels colour it contains. Is this possible?
Get an NSBitmapImageRep from your NSImage. Then you can get access to the pixels.
NSImage
NSImage* img = ...; NSBitmapImageRep* raw_img = [NSBitmapImageRep imageRepWithData:[img TIFFRepresentation]]; NSColor* color = [raw_img colorAtX:0 y:0];