@curve with @adjust not working
@wysaid hi, i just modified some BasicImageDemoActivity.java filter and add @curve filter t at 0 index then run program, i fond that @curve filter is not working with @adjust.
` protected static final String BASIC_FILTER_CONFIG = "@curve R(0, 0)(117, 95)(155, 171)(179, 225)(255, 255)G(0, 0)(94, 66)(155, 176)(255, 255)B(0, 0)(48, 59)(141, 130)(255, 224) @adjust brightness 0 @adjust contrast 1 @adjust saturation 1 @adjust sharpen 0"; protected static final String[] BASIC_FILTER_NAMES = { "curve", "brightness", "contrast", "saturation", "sharpen" };
AdjustConfig[] mAdjustConfigs = { new AdjustConfig(0, 0.0f, 0.0f, 1.0f), //curve new AdjustConfig(1, -1.0f, 0.0f, 1.0f), //brightness new AdjustConfig(2, 0.1f, 1.0f, 3.0f), //contrast new AdjustConfig(3, 0.0f, 1.0f, 3.0f), //saturation new AdjustConfig(4, -1.0f, 0.0f, 10.0f) //sharpen }; `
Some filters' intensity just can not be changed by now.
You can implement their setIntensity function.
I will solve this later.
thanks @wysaid. Issue solved by implementing setIntensity in CGEMoreCurveTexFilter with changing fragment shader.
Now, The new problem arrives with multiple filter. Step 1 : First assume above filter list, then apply that filter Now if i want to change particular filter, let example
filter at index 0 = @curve R(0, 0)(117, 95)(155, 171)(179, 225)(255, 255)G(0, 0)(94, 66)(155, 176)(255, 255)B(0, 0)(48, 59)(141, 130)(255, 224) to @curve R(0, 4)(255, 244)G(0, 0)(255, 255)B(0, 84)(255, 194) then i have to apply whole filter using setFilterWithConfig method, can i change particular filter in filter list and apply direct without affecting already passed filter ?
thanks @wysaid. Issue solved by implementing setIntensity in CGEMoreCurveTexFilter with changing fragment shader.
👍
Now, The new problem arrives with multiple filter. Step 1 : First assume above filter list, then apply that filter Now if i want to change particular filter, let example
filter at index 0 = @curve R(0, 0)(117, 95)(155, 171)(179, 225)(255, 255)G(0, 0)(94, 66)(155, 176)(255, 255)B(0, 0)(48, 59)(141, 130)(255, 224) to @curve R(0, 4)(255, 244)G(0, 0)(255, 255)B(0, 84)(255, 194) then i have to apply whole filter using setFilterWithConfig method, can i change particular filter in filter list and apply direct without affecting already passed filter ?
Sure, you should write some function to manage your filter in CGEImageHandler.
Plz have a try.
Yah, but where i can replace already added curve filter string to new curve filter string.
@wysaid i tried but no result, do you have some reference where i can replace new filter with the already applied filters( in multiple filter list )