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