2 Steps to create a bitmap from byte array in android



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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>