Java examples for 2D Graphics:BufferedImage Convert
convert Image To Gray Scale
//package com.java2s; import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; import java.awt.image.ColorConvertOp; public class Main { private static ColorConvertOp colorConvertOperation = new ColorConvertOp( ColorSpace.getInstance(ColorSpace.CS_GRAY), null); public static BufferedImage convertImageToGrayScale( BufferedImage bufferedImage) { return colorConvertOperation.filter(bufferedImage, null); }/* ww w . j a va 2s .c o m*/ }