I am trying to draw a sprite with NSImage using the drawInRect method. I noticed quickly that the coordinates passed in the rects are not in pixels but in points. I need to draw my sprites with pixel level accuracy, as each sprite is say exactly 73x92 pixels in dimensions.
In short, it seems I need either one of the following: 1) NSImage to accept my rects that are in pixels not some other unit. 2) a very accurate conversion from pixel to NSImage units such that addressing a pixel will not lead to any blurriness due to anti-aliasing effects.
There is nothing fundamentally wrong with NSImage that would make that impossible. If you give it appropriate source and destination rects, it can certainly draw with pixel-level accuracy. You'll have to post your code for us to help in that regard.
However, you may find it easier to deal with a lower-level API. NSImage is designed to work with anything that seems like an image -- bitmaps, PDFs, etc. That generality, and its age, leads to some confusing behavior sometimes. I've found that using CGImage (which is always a bitmap) can be a lot more predictable. Or, try NSBitmapImageRep.