2

我正在尝试从 sampleBufferData 创建 UIImage 以及控制台中的内容

:CGBitmapContextCreate:无效数据字节/行:对于 8 个整数位/分量、3 个分量、kCGImageAlphaPremultipliedFirst,应至少为 1920。
: 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);
4

0 回答 0