Here you can find the source of brightenImage(BufferedImage srcImg)
public static BufferedImage brightenImage(BufferedImage srcImg)
//package com.java2s; //License from project: Apache License import java.awt.image.BufferedImage; import java.awt.image.LookupOp; import java.awt.image.LookupTable; import java.awt.image.ShortLookupTable; public class Main { public static BufferedImage brightenImage(BufferedImage srcImg) { short brighten[] = new short[256]; for (int i = 0; i < 256; i++) { short pixelValue = (short) (i + 10); if (pixelValue > 255) pixelValue = 255;// w w w .j ava 2s. co m else if (pixelValue < 0) pixelValue = 0; brighten[i] = pixelValue; } LookupTable lookupTable = new ShortLookupTable(0, brighten); return applyFilter(lookupTable, srcImg); } public static BufferedImage applyFilter(LookupTable lookupTable, BufferedImage srcImg) { LookupOp lop = new LookupOp(lookupTable, null); return lop.filter(srcImg, null); } }