Android Bitmap from Byte Array Create bytes2Bitmap(byte[] b)

Here you can find the source of bytes2Bitmap(byte[] b)

Description

bytes Bitmap

Declaration

public static Bitmap bytes2Bitmap(byte[] b) 

Method Source Code

//package com.java2s;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Main {
    public static Bitmap bytes2Bitmap(byte[] b) {
        if (b.length != 0) {
            return BitmapFactory.decodeByteArray(b, 0, b.length);
        } else {//  w  w  w  . j a v a2s  .  co  m
            return null;
        }
    }
}

Related

  1. byteArrayToBitmap(byte[] b)
  2. createBinaryImage(int[][] source, int width, int height)
  3. createBitmapFromByteArray(byte[] data)
  4. makeBitmap(byte[] jpegData, int maxNumOfPixels)
  5. unFlattenBitmap(byte[] bitmapData)