Android Bitmap Load base642Bitmap(String string)

Here you can find the source of base642Bitmap(String string)

Description

base Bitmap

License

Open Source License

Declaration

public static Bitmap base642Bitmap(String string) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

import android.util.Base64;

public class Main {
    public static Bitmap base642Bitmap(String string) {
        Bitmap bitmap = null;/*from  w  w w  . ja  va 2s  .c  o m*/
        try {
            byte[] bitmapArray;
            bitmapArray = Base64.decode(string, Base64.DEFAULT);
            bitmap = BitmapFactory.decodeByteArray(bitmapArray, 0,
                    bitmapArray.length);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bitmap;
    }
}

Related

  1. GetBitmap(String imageUrl)
  2. decodeBitmap(Resources res, int resId)
  3. decodeBitmap(Resources res, int resId, int reqWidth, int reqHeight)
  4. decodeFromFile(String path)
  5. decodeFromFile(String path, int reqWidth, int reqHeight)