BradLarson / GPUImage3

GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal.
BSD 3-Clause "New" or "Revised" License
2.68k stars 331 forks source link

OverlayBlend with OpacityAdjustment looks not correct #57

Open paulstampfer opened 4 years ago

paulstampfer commented 4 years ago

Hi,

I try to add some noise overlay to an image with the following:

var picture = PictureInput(image:UIImage(named:"IMG_3331.jpg")!) var blendImage = PictureInput(image:UIImage(named:"Noise.jpg")!) let opacityFilter = OpacityAdjustment() let blendFilter = OverlayBlend()

opacityFilter.opacity = mySlider.value

blendImage --> opacityFilter --> blendFilter picture --> blendFilter --> renderView

blendImage.processImage()

When the opacityFilter.opacity is 0 then I see the Noise.jpg completely (expected that I don't see it at all), and when opacityFilter.opacity is 1 then I see the Noise.jpg only slightly as an overlay.

What is the issue?