GPUImage 正片叠底效果

    

  

 GPUImagePicture *stillImageSource1 = [[GPUImagePicture alloc] initWithImage:_overImage];
    
    GPUImagePicture *stillImageSource2 = [[GPUImagePicture alloc] initWithImage:_contentImage];
    
    GPUImageMultiplyBlendFilter *blendFilter = [[GPUImageMultiplyBlendFilter alloc] init];
    [stillImageSource1 processImage];
    [stillImageSource1 addTarget:blendFilter];
    [stillImageSource2 addTarget:blendFilter];
    [stillImageSource2 processImage];
    
    [blendFilter useNextFrameForImageCapture];
    
    UIImage *filteredImage = [blendFilter imageFromCurrentFramebuffer];

你可能感兴趣的:(iOS记录)