把char *的数据转换成图片

  CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

            CGContextRef ctx = CGBitmapContextCreate(pScreenBmpStore->pData_buff,imageWidth,imageHeight, 8  ,nBytes_per_Row , colorSpace,kCGImageAlphaPremultipliedLast );

            CGImageRef imageRef = CGBitmapContextCreateImage (ctx);

            UIImage* image = [UIImage imageWithCGImage:imageRef];

你可能感兴趣的:(IOS开发,图片转换)