Over a million developers have joined DZone.

Java - Color2Gray

·

public BufferedImage toGray(BufferedImage bi)
	{
		ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
		ColorConvertOp op = new ColorConvertOp(cs, null);
		
		return op.filter(bi, null);
	}
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}