画像に GPUImage フィルターを適用しているときに奇妙な問題に直面しています。画像にさまざまなフィルターを適用しようとしていますが、10 ~ 15 個のフィルターを適用すると、メモリ警告が表示されてクラッシュします。コードは次のとおりです。
sourcePicture = [[GPUImagePicture alloc] initWithImage:self.m_imageView.image smoothlyScaleOutput:YES];
GPUImageBrightnessFilter *bright=[[GPUImageBrightnessFilter alloc]init];
[bright setBrightness:0.4];
GPUImageFilter *sepiaFilter = bright;
[sepiaFilter prepareForImageCapture];
[sepiaFilter forceProcessingAtSize:CGSizeMake(640.0, 480.0)]; // This is now needed to make the filter run at the smaller output size
[sourcePicture addTarget:sepiaFilter];
[sourcePicture processImage];
UIImage *sep=[sepiaFilter imageFromCurrentlyProcessedOutputWithOrientation:3];
self.m_imageView.image=sep;
[sourcePicture removeAllTargets];
誰かが同じ問題を経験した場合は、提案してください。ありがとう