Convert base64 String To Bitmap - Android Graphics

Android examples for Graphics:Bitmap String

Description

Convert base64 String To Bitmap

Demo Code


//package com.java2s;

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

import android.util.Base64;

public class Main {
    public static Bitmap base64ToBitmap(String base64) {
        byte[] byteArr = Base64.decode(base64, 0);
        return BitmapFactory.decodeByteArray(byteArr, 0, byteArr.length);
    }//from w ww .  j  av a 2s  .co m
}

Related Tutorials