ios-gpuimage-plus icon indicating copy to clipboard operation
ios-gpuimage-plus copied to clipboard

Set custom setting for apply brightness , saturation , contrast etc

Open anvpn opened this issue 7 years ago • 10 comments

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 avatar Aug 21 '18 06:08 anvpn

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 avatar Aug 21 '18 07:08 anvpn

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 avatar Aug 21 '18 07:08 anvpn

I need help . please @wysaid

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

anvpn avatar Aug 23 '18 04:08 anvpn

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

wysaid avatar Aug 29 '18 03:08 wysaid

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 avatar Aug 29 '18 03:08 anvpn

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 ?

anvpn avatar Aug 29 '18 03:08 anvpn

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 avatar Sep 04 '18 12:09 wysaid

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

wysaid avatar Sep 04 '18 12:09 wysaid

Hi Wysaid

Thanks for Reply Really appreciated

I have found of set visuialze property for image and i need same for Video also

I have found this "setFilterIntensityForIndex" which used in this class "ImageGLSurfaceView.java".

Could you please help me how can i create same method for video's visual property same as image

I have tried same but could not succeed.

I am struggling for this long time , and the project deadline is too near

Please help me

On Tue, Sep 4, 2018 at 6:05 PM Wang Yang [email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wysaid/ios-gpuimage-plus/issues/43#issuecomment-418350556, or mute the thread https://github.com/notifications/unsubscribe-auth/Akq73CsldroY9jHLc8r8_bdCpZ220VvMks5uXnOugaJpZM4WFMqg .

anvpn avatar Sep 04 '18 12:09 anvpn

Currently i am referring the android case here.

On Tue, Sep 4, 2018 at 6:12 PM an vpn [email protected] wrote:

Hi Wysaid

Thanks for Reply Really appreciated

I have found of set visuialze property for image and i need same for Video also

I have found this "setFilterIntensityForIndex" which used in this class "ImageGLSurfaceView.java".

Could you please help me how can i create same method for video's visual property same as image

I have tried same but could not succeed.

I am struggling for this long time , and the project deadline is too near

Please help me

On Tue, Sep 4, 2018 at 6:05 PM Wang Yang [email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wysaid/ios-gpuimage-plus/issues/43#issuecomment-418350556, or mute the thread https://github.com/notifications/unsubscribe-auth/Akq73CsldroY9jHLc8r8_bdCpZ220VvMks5uXnOugaJpZM4WFMqg .

anvpn avatar Sep 04 '18 12:09 anvpn