Mars_999
2004.08.15, 09:22 PM
I am trying to send my unsigned char* data to NSImage so I can use NSImageView to show the image on screen. I am not having luck passing my C data to the NSData class? or NSImage class.
NSData *image = [NSData dataWithBytes:texture.imageData length:sizeof(texture.imageWidth * texture.imageHeight * texture.colorMode)];
NSImage *beforeBlendmap = [[NSImage alloc] initWithData:texture.imageData];
Thanks
NSData *image = [NSData dataWithBytes:texture.imageData length:sizeof(texture.imageWidth * texture.imageHeight * texture.colorMode)];
NSImage *beforeBlendmap = [[NSImage alloc] initWithData:texture.imageData];
Thanks