private ImageProcessor brightness ( ImageProcessor ip , String brightAmt ) { if ( brightAmt != null ) { try { float bright = Float . parseFloat ( brightAmt ) ; if ( bright < 0 ) { return ip ; } ip . multiply ( bright ) ; } // no need to do anything with number format exception since the servlet // returns only images; just return the original image catch ( NumberFormatException e ) { } } return ip ; }
Adjusts the brightness of an image by a supplied amount .