char* to NSData
[NSData dataWithBytes:myImageData length:myImageDataLength]
NSData to char*
NSData *data = [NSData dataWithContentsOfFile:filePath];
NSUInteger len = [data length];
Byte *byteData = (Byte*)malloc(len);
memcpy(byteData, [data bytes], len);
沒有留言:
張貼留言