how to convert binary data to image?
问题 In my android application. I got binary code from a jpeg image from the code as follows. byte[] val = stream.toByteArray(); BigInteger bi = new BigInteger(val); String s = bi.toString(2); This string s prints the binary value of the image. My question is how to convert this binary format into a jpeg image?? 回答1: I'm not really sure what you want. If you want to create a Bitmap -instance directly from the stream you can use BitmapFactory and display that Bitmap in an ImageView -instance