decode Base64 string and create Bitmap from it - Android Graphics

Android examples for Graphics:Bitmap String

Description

decode Base64 string and create Bitmap from it

Demo Code


//package com.java2s;

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

import android.util.Base64;

public class Main {
    public static Bitmap decodeBase64(String input) {
        byte[] decodedByte = Base64.decode(input, 0);
        return BitmapFactory.decodeByteArray(decodedByte, 0,
                decodedByte.length);//from   w  ww.jav  a 2  s .c o m
    }
}

Related Tutorials