objective c - NSCursor appears in black and white -


i'm trying display cursor using following code:

// imagedata raw data pointer file (uint8_t* vector) nsdata* o_imagedata = [ nsdata datawithbytes:imagedata.begin() length:imagedata.size() ]; nsimage* o_image = [[nsimage alloc] initwithdata: o_imagedata];  // hotspot extracted earlier on cursor_ = [[nscursor alloc] initwithimage:o_image hotspot:o_hotspot];  

now, when set cursor current, displays cursor in greyscale. it's something, rather have in colour (as original image). cursor image encoded within .cur file (win32 standard cursor format, similar .ico format). on win32 cursor displayed , in colour , when load cursor file works fine too, initialising image raw data seems initialise wrong. have image representation? , if so, how go fixing that?


Comments