burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.13k stars 991 forks source link

setFilterEffect(customEffect) replaces another filter effect. #349

Closed KimiChiu closed 3 years ago

KimiChiu commented 3 years ago
// set brightness first 
CustomEffect customEffect = new CustomEffect.Builder(EffectFactory.EFFECT_BRIGHTNESS)
                                    .setParameter("brightness", brightnessValue)
                                    .build();
photoEditor.setFilterEffect(customEffect);

// set blackWhite will replace the brightness effect
customEffect = new CustomEffect.Builder(EffectFactory.EFFECT_BLACKWHITE)
                                        .setParameter("black", 1.0f - simpleCurveValue)
                                        .build();

// brightness effect disappeared after this line.
photoEditor.setFilterEffect(customEffect);

Does this work as intended? Is there a way to add multiple filters to the same image?

burhanrashid52 commented 3 years ago

This is by design. You can apply one filter at a time. It won't overlap.