Wednesday 17 September 2014

Converting Byte Array to Bitmap in Android

public Bitmap ByteArrayToBitmap(byte[] byteArray)
    {
        ByteArrayInputStream arrayInputStream = new ByteArrayInputStream(byteArray);
        Bitmap bitmap = BitmapFactory.decodeStream(arrayInputStream);
        return bitmap;
    }

2 comments:

  1. Muchas gracias me funcio a la perfección..!

    ReplyDelete
  2. whene i use your code to conver bytearray to bitmap but value of bitmaps null.
    Thanks .

    ReplyDelete