conversion of byte array to image

前端 未结 1 1588
遇见更好的自我
遇见更好的自我 2020-12-16 23:17

I want to convert a byte array to an image ,For that I used the code

final BufferedImage bufferedImage = ImageIO.read(new ByteArrayInputStream(decrpt));


        
相关标签:
1条回答
  • 2020-12-17 00:01

    Hope this code will help you:

    byte[] data = item1.getBytes();
    Bitmap bmp = BitmapFactory.decodeByteArray(data, 0, data.length);
    imageview.setImageBitmap(bmp);
    
    0 讨论(0)
提交回复
热议问题