List of utility methods to do Bitmap from Byte Array Create
Bitmap | byteArrayToBitmap(byte[] b) byte Array To Bitmap return BitmapFactory.decodeByteArray(b, 0, b.length);
|
Bitmap | bytes2Bitmap(byte[] b) bytes Bitmap if (b.length != 0) { return BitmapFactory.decodeByteArray(b, 0, b.length); } else { return null; |
Bitmap | createBinaryImage(int[][] source, int width, int height) create Binary Image Bitmap bm = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); Canvas canvas = new Canvas(bm); int vlen = source.length; int hlen = source[0].length; int rectWidth = width / hlen; int rectHeight = height / hlen; Rect r = new Rect(0, 0, rectWidth, rectHeight); ... |
Bitmap | createBitmapFromByteArray(byte[] data) create Bitmap From Byte Array return BitmapFactory.decodeByteArray(data, 0, data.length);
|
Bitmap | makeBitmap(byte[] jpegData, int maxNumOfPixels) make Bitmap try { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeByteArray(jpegData, 0, jpegData.length, options); if (options.mCancel || options.outWidth == -1 || options.outHeight == -1) { return null; ... |
Bitmap | unFlattenBitmap(byte[] bitmapData) un Flatten Bitmap Bitmap bitmap = null; if (bitmapData != null && bitmapData.length > 0) { bitmap = BitmapFactory.decodeByteArray(bitmapData, 0, bitmapData.length); return bitmap; |
Bitmap | getBitmapImage(Context context, String base64) Gets the bitmap image. String imagestring = base64; byte[] imageAsBytes = Base64.decode(imagestring.getBytes(), 5); return BitmapFactory.decodeByteArray(imageAsBytes, 0, imageAsBytes.length); |
Bitmap | Bytes2Bimap(byte[] b) Bytes Bimap if (b.length != 0) { return BitmapFactory.decodeByteArray(b, 0, b.length); } else { return null; |
Bitmap | bytes2Bimap(byte[] b) bytes Bimap Bitmap bitmap = null; try { if (b.length != 0) { bitmap = BitmapFactory.decodeByteArray(b, 0, b.length); } catch (Exception e) { e.printStackTrace(); return bitmap; |
Bitmap | convertByteArrayToBitmap(byte[] b) convert Byte Array To Bitmap if (b == null) { return null; ByteArrayInputStream imageStream = new ByteArrayInputStream(b); Bitmap theImage = BitmapFactory.decodeStream(imageStream); return theImage; |