I'm starting a small cocoa application that will convert an image file into a 1-bit text format that is compatible with my z80 assembler (for TI-83+ programs). I already wrote one in Real Basic about a year ago (ay, the shame!), but for various reasons I no longer have it. My problem with the cocoa version is figuring out how to access the pixels/data of a NSImage directly. Does anybody know how this works? Do you have to create and add a bitmap representation to the NSImage, or is there some other way?
In the Real Basic version, I just looped through all of the pixels performing pixel tests. It wasn't the most efficient method, but it worked well. A quick look at NSImage's documentation, however, provided no equivalent to Real Basic's pixel tests.
My next question deals with monitoring cpu usage. Is there any way to figure out the current level of cpu activity other than making a NSTask that runs the unix "top" command?
Finally, is there a way to monitor the audio output of the built in audio controller? I'm thinking of some pointless program that draws a sound-analysis similar to that of iTunes. I wrote the graphing code, but I need data!
In short, I know nearly nothing about cocoa
Thanks
In the Real Basic version, I just looped through all of the pixels performing pixel tests. It wasn't the most efficient method, but it worked well. A quick look at NSImage's documentation, however, provided no equivalent to Real Basic's pixel tests.
My next question deals with monitoring cpu usage. Is there any way to figure out the current level of cpu activity other than making a NSTask that runs the unix "top" command?
Finally, is there a way to monitor the audio output of the built in audio controller? I'm thinking of some pointless program that draws a sound-analysis similar to that of iTunes. I wrote the graphing code, but I need data!
In short, I know nearly nothing about cocoa
Thanks