Blog Archives


In android programming, we often should create bitmaps from a byte array, for example, when you want to take picture, you should create a photo from a byte array, meanwhile when you want to show a image from online, you also need create a bitmap from byte array.

So if you want to create a bitmap from byte array, if can do like this:

Step 1: Get a byte array which contains bitmap data

If you want to create a bitmap from a byte array, you should be sure this byte array contains the data of a image, if not we will not create one. This byte array can be got easily, for example, this byte array can be create by camera, reading a image on local or online website.