base64 String To Bitmap - Android Graphics

Android examples for Graphics:Bitmap String

Description

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 base64Data) {
        byte[] bytes = Base64.decode(base64Data, Base64.DEFAULT);
        return BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
    }/*www . j  a  va2 s  .  co m*/
}

Related Tutorials