现在的位置: 首页 > 综合 > 正文

把char *的数据转换成图片

2017年12月09日 ⁄ 综合 ⁄ 共 325字 ⁄ 字号 评论关闭

 
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];

【上篇】
【下篇】

抱歉!评论已关闭.