Java: convert image to byte array, convert byte array to image

This post shows two different ways to convert an image to a byte array and convert a byte array to an image. First of all, the byte type in Java is an 8-bit signed two’s complement integer. Its range is [-128, 127]. A byte array is just an array of bytes. An image is essentially … Read more