Blend Filter problem.
I was using GPUImage framework (some old version) to blend 2 images (add border overlay to certain image).
After I have updated to new framework, after applying such a blend, I get empty black image.
I'm using next method:
- (void)addBorder {
if (currentBorder != kBorderInitialValue) {
GPUImageAlphaBlendFilter *blendFilter = [[GPUImageAlphaBlendFilter alloc] init];
GPUImagePicture *imageToProcess = [[GPUImagePicture alloc] initWithImage:self.imageToWorkWithView.image];
GPUImagePicture *border = [[GPUImagePicture alloc] initWithImage:self.imageBorder];
blendFilter.mix = 1.0f;
[imageToProcess addTarget:blendFilter];
[border addTarget:blendFilter];
[imageToProcess processImage];
self.imageToWorkWithView.image = [blendFilter imageFromCurrentlyProcessedOutput];
[blendFilter release];
[imageToProcess release];
[border release];
}
}
What is the problem?