get Bitmap From base64 String - Android android.graphics

Android examples for android.graphics:Bitmap Create

Description

get Bitmap From base64 String

Demo Code

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Base64;
import android.util.Log;
import java.io.ByteArrayOutputStream;

public class Main{

    public static final Bitmap getBitmapFromString(String thumbData) {
        byte[] bytes = Base64.decode(thumbData, Base64.DEFAULT);
        return BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
    }//  www  .  j  a  v a  2 s .c  o m

}

Related Tutorials