title: Adjust brightness and contrast of BufferedImage in Java
body: <p>I'm processing a bunch of images with some framework, and all I'm given is a bunch of <code>BufferedImage</code> objects. Unfortunately, these images are really dim, and I'd like to brighten them up and adjust the contrast a little.</p>
  
  <p>Something like:</p>
  
  <pre><code>BufferedImage image = something.getImage();
  image = new Brighten(image).brighten(0.3); // for 30%
  image = new Contrast(image).contrast(0.3);
  // ...
  </code></pre>
  
  <p>Any ideas?</p>