GPUImage - CVPixelBufferCreate -6661出错

时间:2014-07-06 10:05:44

标签: ios objective-c ios7 gpuimage

您好我正在尝试使用新的GPUImage设置编辑单个图像,但我遇到了以下错误。

2014-07-06 11:52:46.966 App[4314:9d07] *** Assertion failure in -[GPUImageFramebuffer generateFramebuffer],   /Users/Desktop/Apps/App/App/framework/Source/GPUImageFramebuffer.m:156
2014-07-06 11:52:46.968 App[4314:9d07] *** Terminating app due to uncaught   exception 'NSInternalInconsistencyException', reason: 'Error at CVPixelBufferCreate -6661'
*** First throw call stack:
(0x2e52dfd3 0x38da6ccf 0x2e52dead 0x2eedad5b 0xb9ca7 0x6c481 0xb990f 0xb93cf 0xbbef1   0x6c481 0xbbc67 0x98229 0x61b39 0x98d9d 0x7065f 0x3928e833 0x39294f11 0x39294c97    0x39295a45 0x39295d29 0x393d0bd3 0x393d0a98)
libc++abi.dylib: terminating with uncaught exception of type NSException


GPUImagePicture *lookupImageSource = [[GPUImagePicture alloc] initWithImage:[UIImage imageNamed:@"BigApple1.png"]];

    GPUImageLookupFilter * filterLookup = [[GPUImageLookupFilter alloc] init];

    [stillImageSource addTarget:filterLookup];
    [lookupImageSource addTarget:filterLookup];

    [stillImageSource useNextFrameForImageCapture];
    [lookupImageSource useNextFrameForImageCapture];

    [stillImageSource processImage];
    [lookupImageSource processImage];

    finishedImage = [filterLookup imageFromCurrentFramebuffer];

1 个答案:

答案 0 :(得分:1)

问题解决了,我在GPUImageLookupFilter上错过了额外的useNextFrameForImageCapture。