cats-oss / android-gpuimage

Android filters based on OpenGL (idea from GPUImage for iOS)
8.98k stars 2.26k forks source link

How to use a blending effect? #477

Closed mohsinnaqvi110 closed 4 years ago

mohsinnaqvi110 commented 4 years ago

Usage Of Blend Filters

There are multiple blend modes available but the usage is unclear.

for example: If I try to put Overlay blend effect on two images, Is this a correct way to do that as I am confuse How do I add the second image to get a proper output; Even In the shader it takes to texture inputs;

Uri imageUri = ...;
gpuImageView = findViewById(R.id.gpuimageview);
gpuImageView.setImage(imageUri); // this loads image on the current thread, should be run in a thread
gpuImageView.setFilter(new GPUImageOverlayBlendFilter());

Anybody; Correct way?

IAmWilling commented 4 years ago

Now I have a project that needs to use multiple filters to stack each output result together, but it will have a serious picture picture conflict effect. I hope the author can solve this big problem!