Android examples for android.graphics:BitmapFactory
get Picture From Bytes using BitmapFactory
import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.ByteArrayOutputStream; import java.io.InputStream; public class Main{ public static Bitmap getPicFromBytes(byte[] bytes, BitmapFactory.Options opts) { if (bytes != null) if (opts != null) return BitmapFactory.decodeByteArray(bytes, 0, bytes.length, opts); else// ww w . j a v a 2s. co m return BitmapFactory .decodeByteArray(bytes, 0, bytes.length); return null; } }