I am converting an image to binary image, and use a 1 and a 0 to represent white and black. I only managed to use color array, i.e. white is {255, 255, 255} and black is {0, 0, 0}. Can anybody help please? Many thanks.
Asked
Active
Viewed 370 times
0
-
Related question - http://stackoverflow.com/questions/15414259/java-bufferedimage-to-byte-array-and-back – Gilbert Le Blanc Dec 07 '13 at 19:06
-
Use `new BufferedImage(w, h, BufferedImage.TYPE_BYTE_BINARY)`. – Harald K Dec 08 '13 at 13:25