Java tutorial
//package com.java2s; import java.io.ByteArrayOutputStream; import android.graphics.Bitmap; import android.util.Base64; public class Main { public static String bitmapChangeString(Bitmap bitmap) { if (bitmap != null) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); String str = new String(Base64.encodeToString(baos.toByteArray(), Base64.DEFAULT)); return str; } return null; } }