public static BufferedImage invertImageColor ( BufferedImage image ) { BufferedImage tmp = new BufferedImage ( image . getWidth ( ) , image . getHeight ( ) , image . getType ( ) ) ; BufferedImageOp invertOp = new LookupOp ( new ShortLookupTable ( 0 , invertTable ) , null ) ; return invertOp . filter ( image , tmp ) ; }
Inverts image color .