I would like to convert an image to 2-color, black and white using Java. I'm using the following code to convert to grayscale:
ColorConvertOp op = new ColorConvertOp(
ColorSpace.getInstance(ColorSpace.CS_GRAY), null);
BufferedImage grayImage = op.filter(image, null);
But I'm not sure how to modify this to convert to just black and white.