Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

printz

macrumors regular
Original poster
Dec 23, 2012
218
0
I'm trying to make a photomosaic generator for OSX. What I need is to be able to get direct bitmap/pixel data from images (so I can determine the average colour of a mosaic tile), but NSImage seems too high level for this. Any help please? The Apple documentation about drawing looks huge and has lots of variants (Cocoa, Quartz, OpenGL)… I'd prefer Cocoa here.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
From an NS image you can extract an image representation and then get bitmap data pointed to by an unsigned char pointer.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.