我正在尝试使用GPUImage在我的应用中实现一些相机过滤器。一切正常,但有时候,有一些(一些,真的)照片我得到以下结果:
我正在使用GPUImageLookupFilter,这是代码
@property (nonatomic, retain) GPUImagePicture *stillImageSource;
----
_stillImageSource = [[GPUImagePicture alloc] initWithImage:self.previewImage]; <- in viewDidLoad
----
[_stillImageSource removeAllTargets];
GPUImagePicture *lookUpSource = [[GPUImagePicture alloc] initWithImage:[UIImage imageNamed:self.lookUpArray[sender.tag]]];
GPUImageLookupFilter *lookUpFilter = [[GPUImageLookupFilter alloc] init];
[_stillImageSource addTarget:lookUpFilter];
[lookUpSource addTarget:lookUpFilter];
[_stillImageSource processImage];
[lookUpSource processImage];
self.imageView.image = [lookUpFilter imageFromCurrentlyProcessedOutput];
有人有想法吗?
PS:对不起我的英语。
编辑:
以下是解决方案:ios GPUImage,bad result of image processing with small-size images?