Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@curve with @adjust not working #455

Open
imandaliya opened this issue Feb 10, 2020 · 7 comments
Open

@curve with @adjust not working #455

imandaliya opened this issue Feb 10, 2020 · 7 comments

Comments

@imandaliya
Copy link

@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
};
`

@wysaid
Copy link
Owner

wysaid commented Feb 11, 2020

Some filters' intensity just can not be changed by now.
You can implement their setIntensity function.
I will solve this later.

@wysaid wysaid pinned this issue Feb 11, 2020
@imandaliya
Copy link
Author

thanks @wysaid. Issue solved by implementing setIntensity in CGEMoreCurveTexFilter with changing fragment shader.

@imandaliya
Copy link
Author

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 ?

@wysaid
Copy link
Owner

wysaid commented Feb 12, 2020

thanks @wysaid. Issue solved by implementing setIntensity in CGEMoreCurveTexFilter with changing fragment shader.

👍

@wysaid
Copy link
Owner

wysaid commented Feb 12, 2020

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.

@imandaliya
Copy link
Author

Yah, but where i can replace already added curve filter string to new curve filter string.

@imandaliya
Copy link
Author

imandaliya commented Feb 20, 2020

@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 )

@imandaliya imandaliya changed the title @curve with @adjust not worling @curve with @adjust not working Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants