CGBitmapContextCreate中的错误

时间:2011-08-24 11:41:27

标签: iphone video-streaming avfoundation cgbitmapcontextcreate cgbitmapcontext

我正在尝试从sampleBufferData创建UIImage,这里是我在控制台中的内容

:CGBitmapContextCreate:无效数据字节/行:对于8个整数位/组件,3个组件,至少应为1920,kCGImageAlphaPremultipliedFirst。
:CGBitmapContextCreateImage:无效的上下文0x0

这是我的代码

// Create a bitmap graphics context with the sample buffer data
CGContextRef context = CGBitmapContextCreate(baseAddress, width, height, 8, 
  bytesPerRow, colorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedFirst); 
// Create a Quartz image from the pixel data in the bitmap graphics context
CGImageRef quartzImage = CGBitmapContextCreateImage(context);

0 个答案:

没有答案