Rea*_*ion 5 cocoa objective-c cgimage ios
谁能告诉我一个如何使用的明确例子
CGImageRef CGImageCreate
(
size_t width,
size_t height,
size_t bitsPerComponent,
size_t bitsPerPixel,
size_t bytesPerRow,
CGColorSpaceRef colorspace,
CGBitmapInfo bitmapInfo,
CGDataProviderRef provider,
const CGFloat decode[],
bool shouldInterpolate,
CGColorRenderingIntent intent
);
Run Code Online (Sandbox Code Playgroud)
我有一个CGFloat dataBuffer [width*height*3];
它包含图像的所有RGB数据.基本上,它从像素R(0,0),G(0,0),B(0,0),R(0,1)...到R(宽度,高度),G(宽度,高度) ,B(宽度,高度)
我知道图像的大小,宽x高.我如何使用我拥有的信息并创建CGImage?
请帮忙,谢谢
我发布了另一个包含上述问题的问题.nschmidt正确回答,这是链接
| 归档时间: |
|
| 查看次数: |
12725 次 |
| 最近记录: |