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

Set custom setting for apply brightness , saturation , contrast etc #43

Open
anvpn opened this issue Aug 21, 2018 · 10 comments
Open

Set custom setting for apply brightness , saturation , contrast etc #43

anvpn opened this issue Aug 21, 2018 · 10 comments

Comments

@anvpn
Copy link

anvpn commented Aug 21, 2018

Hi wysaid

I hope you are doing well , Again i need your expertise help

I have requirement of set brightness,contrast,saturation as user want , i want to customize the filter as user want

I will give three slider where user can set the slider value and filter reflect according that

I have tried by following way

float currentBrightness = [sender value] ;//* 3.0f - 1.0f; //[-1, 2]

const char* config = "@adjust brightness ";

NSString *configDate = [NSString stringWithUTF8String:config];
 configDate =  [configDate stringByAppendingString:[NSString stringWithFormat:@"%.2f",currentBrightness]];
config = [configDate UTF8String];

NSLog(@"brightness effect %s--------",config);

[_myCameraViewHandler setFilterWithConfig:config];

Same for saturation and contrast but when i set brightness it works perfect but when apply saturation it wont work

Please suggest me how can i achieve this

Help really appricicated

Thanks

@anvpn
Copy link
Author

anvpn commented Aug 21, 2018

I have tried also following by merge three of then in single config

const char* config = [[NSString stringWithFormat:@"%@%@%@%@%@%@",@" @adjust brightness ",_strBrightness ,@" @adjust saturation ",_strSaturtion ,@" @adjust contrast ",_strContrast] UTF8String];

and it will be like this:
CONFIG----- @adjust brightness 1.00 @adjust saturation 0.22 @adjust contrast 0.64

but still i am not getting exact result

I need your help please

@anvpn
Copy link
Author

anvpn commented Aug 21, 2018

Please also mention the range i can input for three of them like what is start and end range
for Brightness
for Saturation
for Contrast

Currently i am giving 0.0 - 1.00 between

Please help me to achieve the functionality

@anvpn
Copy link
Author

anvpn commented Aug 23, 2018

I need help . please @wysaid

Can you please provide me some guidance so that i can go forward

@wysaid
Copy link
Owner

wysaid commented Aug 29, 2018

@AnitaVPN Please produce your problem in the demo, and give me the link. I can take a look for you.

@anvpn
Copy link
Author

anvpn commented Aug 29, 2018

Could you please reply for this ?

Please also mention the range i can input for three of them like what is start and end range
for Brightness
for Saturation
for Contrast

Currently i am giving 0.0 - 1.00 between

Please help me to achieve the functionality

@anvpn
Copy link
Author

anvpn commented Aug 29, 2018

I want to achieve same functionality as define in this app : https://inshot-editor.en.uptodown.com/android

When you select video - Select Filter and adjust with brightness, contrast,saturation etc
Want to achieve same as this app

I have written code which i have used , could you please check and let me know if i am doing anything wrong ?

@wysaid
Copy link
Owner

wysaid commented Sep 4, 2018

Please also mention the range i can input for three of them like what is start and end range
for Brightness
for Saturation
for Contrast

The range is in the headers. Please see the header. For example:
https://github.com/wysaid/ios-gpuimage-plus/blob/master/library/cge/include/filters/cgeBrightnessAdjust.h

@wysaid
Copy link
Owner

wysaid commented Sep 4, 2018

I will add a new case for the feature as the Android one.

@anvpn
Copy link
Author

anvpn commented Sep 4, 2018 via email

@anvpn
Copy link
Author

anvpn commented Sep 4, 2018 via email

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