Posted By

whitetiger on 11/09/06


Tagged

image jpg java filter images Converter RGB j2me gray dilate bit planes screenshot snapshot


Versions (?)

Java - Color2Gray


 / Published in: Java
 

  1. public BufferedImage toGray(BufferedImage bi)
  2. {
  3. ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
  4. ColorConvertOp op = new ColorConvertOp(cs, null);
  5.  
  6. return op.filter(bi, null);
  7. }

Report this snippet  

You need to login to post a comment.