把char *的数据转换成图片

来源:互联网 发布:耽美网络剧不可抗力 编辑:程序博客网 时间:2024/06/08 06:02

 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

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

           CGImageRef imageRef = CGBitmapContextCreateImage (ctx);

           UIImage* image = [UIImageimageWithCGImage:imageRef];

0 0
原创粉丝点击