How to convert a BufferedImage to black and white?
问题 How can I convert an existing colored BufferedImage to monochrome? I want the image to be completely split between only two rgb codes, black and white. So if there's a border around the image which is a lighter or darker shade of the background, and the background is being converted to white, then I want the border to be converted to white as well, and so on. How can I do this? If its necessary to save the image / load it from disk, I can do that if necessary. Edit: Code to test this: package