Example usage for android.graphics BitmapFactory decodeByteArray

List of usage examples for android.graphics BitmapFactory decodeByteArray

Introduction

In this page you can find the example usage for android.graphics BitmapFactory decodeByteArray.

Prototype

public static Bitmap decodeByteArray(byte[] data, int offset, int length) 

Source Link

Document

Decode an immutable bitmap from the specified byte array.

Usage

From source file:Main.java

public static Bitmap convertByteArrayTobitmap(byte[] imgdata) {
    Bitmap bmp = null;/*w  w  w. jav  a  2 s  .c  o  m*/
    try {
        bmp = BitmapFactory.decodeByteArray(imgdata, 0, imgdata.length);
    } catch (Exception e) {

    }
    return bmp;
}

From source file:Main.java

public static Bitmap convertBytes2Bimap(byte[] b) {
    if (b.length == 0) {
        return null;
    }/*from  w w w .j a va 2s  . c om*/
    return BitmapFactory.decodeByteArray(b, 0, b.length);
}

From source file:Main.java

public static Bitmap Bytes2Bimap(byte[] b) {
    if (b != null) {
        if (b.length != 0) {
            return BitmapFactory.decodeByteArray(b, 0, b.length);
        }/*w  w w .  j  a  va 2  s . com*/
    }
    return null;
}

From source file:Main.java

public static Bitmap BytesToBitmap(byte abyte0[]) {
    Bitmap bitmap;//from w  w  w.ja  v a 2 s.  c om
    if (abyte0.length != 0)
        bitmap = BitmapFactory.decodeByteArray(abyte0, 0, abyte0.length);
    else
        bitmap = null;
    return bitmap;
}

From source file:Main.java

public static Bitmap byteArrayToBitmap(byte[] data) {
    if (data.length == 0) {
        return null;
    }/* www  .j  a va2s .co m*/
    return BitmapFactory.decodeByteArray(data, 0, data.length);
}

From source file:Main.java

public static Bitmap byteArrayToBitmap(byte[] array) {
    if (null == array) {
        return null;
    }//from www .jav a  2  s.  c  om

    return BitmapFactory.decodeByteArray(array, 0, array.length);
}

From source file:Main.java

/**
 * Byte2BitMap/*from  w  w w . j av  a 2 s  .c o  m*/
 */
public static Bitmap byteToBitmap(byte[] temp) {
    if (temp != null) {
        return BitmapFactory.decodeByteArray(temp, 0, temp.length);
    } else {
        return null;
    }
}

From source file:Main.java

public static Bitmap BytesgetByBimap(byte[] b) {
    if (b.length != 0) {
        return BitmapFactory.decodeByteArray(b, 0, b.length);
    } else {//w  ww .j a  va 2 s  .c  o m
        return null;
    }
}

From source file:Main.java

public static Bitmap Bytes2Bimap(byte[] b) {
    if (b.length != 0) {
        return BitmapFactory.decodeByteArray(b, 0, b.length);
    } else {//from w  w w  .j av a  2  s.  com
        return null;
    }
}

From source file:Main.java

/**
 * bytes2Bitmap/*from ww w . j  a  v  a2 s .co  m*/
 *
 * @param data
 * @return
 */
public static Bitmap bytes2Bitmap(byte[] data) {
    return BitmapFactory.decodeByteArray(data, 0, data.length);
}