我想使用GPUImage来调整图像的不透明度,并使用此图像,与其他图片混合。 这是我的使用方式:
GPUImagePicture *originPic = [[GPUImagePicture alloc] initWithImage:image];
UIImage *copyImage = [UIImage imageWithCGImage:image.CGImage];
GPUImageOpacityFilter *opacity = [[GPUImageOpacityFilter alloc] init];
[opacity setOpacity:0.5];
UIImage *opacityAdjusted = [opacity imageByFilteringImage:copyImage];
GPUImagePicture *opacityAdjustedPic = [[GPUImagePicture alloc] initWithImage:opacityAdjusted]
GPUImageScreenBlendFilter *screenBlend = [[GPUImageScreenBlendFilter alloc] init];
[originPic addTarget:screenBlend];
[opacityAdjusted addTarget:addTarget:screenBlend];
[originPic processImage];
[opacityAdjusted processImage];
UIImage *output = [screenBlend imageFromCurrentlyProcessedOutput];
我已显示输出,但结果与“originPic与copyPic混合”相同,我想要的是“originPic与0.5opacityCopyPic混合”