jquery - How to set image brightness to back it's original brightness? -


i using pixastic performins image operations. using it's brightness/contrast code.

here html code

<input type="range" id="brightness_range"  min="-150" max="150" value="0" /> 

and jquery code of pixastic

jquery('#brightness_range').change(function(){         var img = document.getelementbyid ('image');         var brightness_val = parseint(jquery('#brightness_range').val());         pixastic.process(img, "brightness", {brightness:brightness_val});     }); 

i able set it's brightness not able take back.

let me explain... example changed slider value 25 brightness set 25 if drag slider value 0 again 25 it's not setting original brightness of image... :(

i think adding value every time first 25 plus 25 (50) .

please guys me asked similar questions yesturday not getting response stackoverflow .

and think there no other option change brightness of image using slider or if please tell me.

thanks!!!

every pixastic action performed -on top of- canvas. first doing brightness of 25, , brightness of 0 (which doing nothing).

to make work expect, change code following:

jquery('#brightness_range').change(function(){     var img = document.getelementbyid ('image');     var brightness_val = parseint(jquery('#brightness_range').val());     pixastic.revert(img); // note undocumented feature, exists.     pixastic.process(img, "brightness", {brightness:brightness_val}); }); 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -