Posts

Showing posts with the label brigthness control

Brightness control with java Buffered image class..

Image
Hi, today I'm going to tell you how to change brightness of an image with Java's Buffered image class. .. And consider this will be a series of posts regarding image processing/enhancement with Java  :-) . First we need to create an String variable to store the path of image file. String path="filepath_of_ your_image"; for a example I used : String path="/home/gihan/Pictures/nfs_bmw.jpg"; Then create a file type object. And give our path as parameter. File file = new File(path); Then create a  buffered image. BufferedImage bufferedImage = ImageIO.read(file); If you want to, now you can preview your image using : ImageIcon icon; JLabel picLabel=new JLabel();  icon = new ImageIcon(bufferedImage);            picLabel.setIcon(icon); [caption id="attachment_165" align="aligncenter" width="300" caption="An Image before change the Brightness..."] [/caption] But we are going to process that image so let's move to next poi...