cats-oss / android-gpuimage

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

GPUImageGaussianBlurFilter not working in Filtergroup #368

Open rbalajicse opened 7 years ago

rbalajicse commented 7 years ago

I am adding GPUImageGaussianBlurFilter & GPUImageBrightnessFilter in group filter for GPU Image. Brightness working fine while i am changing value in seek bar. But the problem is blur not working when using in filter group. the ui doesn't rendering when i am changing seek the bar. It renders only when the app goes background and come front.

The rendering happens fine when the blur filter not added to the Filter group. Please help me. Thanks.

hristorv commented 6 years ago

@rbalajicse I am experiencing the same issue. Have you resolved the problem?

mym0404 commented 5 years ago

In my case, I want to have 2 filter (Lookup, Brightness), But when i set lookup to filters[0], brightness to filters[1], the change of lookup filters's intensity didn't affect image preview.

So I just make new GPUImageFilterGroup every time when any lookup or brightness value is changed.

It is working.

Good luck

iBotasky commented 5 years ago

@wasabeef same issue I add an adjuster for GPUImageSmoothToonFilter and set the blur size for blur filter, but the the blur is not effect while the seek bar change. Is there have a solution for this problem? image

iBotasky commented 5 years ago

I found a solution with call runPendingOnDrawTasks(). Like this:

    public void setBlurSize(float value) {
        Log.e("onBlurSize ", " size " + value);
        blurFilter.setBlurSize(value);
        blurFilter.runPendingOnDrawTasks();
    }

And it works. But i don't know whether is that will cause another bug.