title: Change brightness of Image with value from input range slider
body: <p>I am using fabricJS. When working with image on canvas I want to increase, decrease brightness of image. for that I use checkbox to select brightness effect then show brightness range selector so that user can select value of brightness applied on image. 
  Now when I click checkbox brightness of image increase, increase in slider increase brightness but after increase, i change slider downwards to decrease brightness, image not changing back with brightness decrease , it turns white...  </p>
  
  <p>HTML Code:</p>
  
  <pre><code>&lt;input type="checkbox" id="image-bright" unchecked&gt; Brightness &lt;br /&gt;
  &lt;div class="brightValue" style="display:none;"&gt; Value:
  &lt;input type="range" id="bright-value" value="0" min="0" max="255" step="1" class="span22"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>var imagebright=document.getElementById("image-bright");
      imagebright&amp;&amp;(imagebright.onclick=function(){
      if(this.checked){
          $('.brightValue').show();
          var cimg=canvas.getActiveObject();
          cimg&amp;&amp;"image"===cimg.type&amp;&amp;(
          cimg.filters.push(new fabric.Image.filters.Brightness({brightness: parseInt($('#bright-value').value, 10)})),
          cimg.applyFilters(canvas.renderAll.bind(canvas)));
       }
       else {
          $('.brightValue').hide();   
          }
      });
  
      var brightvalue=document.getElementById("bright-value");
      brightvalue.onchange = function(){
          var cimg=canvas.getActiveObject();  
          cimg.filters.push(new fabric.Image.filters.Brightness({brightness: parseInt(this.value, 10)}));
          cimg.applyFilters(canvas.renderAll.bind(canvas));
      };
  </code></pre>
  
  <p>once increase brightness, afterwards decrease of brightness value in slider, not decreasing brightness of image. 
  When I uncheck, check Brightness checkbox it increases brightness every time.
  upon uncheck the brightness checkbox I want to turn off brightness effect completely i.e. no brightness effect on image. pls guide me where to change the code.</p>