Android Utililty Methods Bitmap to String Convert

List of utility methods to do Bitmap to String Convert

Description

The list of methods to do Bitmap to String Convert are organized into topic(s).

Method

Stringbase64Bitmap(File file)
base Bitmap
return base64Bitmap(BitmapFactory.decodeFile(file.getPath()));
Stringbitmap2Base64(Bitmap bitmap, int bitmapQuality)
bitmap Base
String string = null;
byte[] bytes = bitmapToBytes(bitmap);
string = Base64.encodeToString(bytes, Base64.DEFAULT);
return string;
BitmapconvertBase64ToBitmap(String data)
convert Base To Bitmap
if (isEmpty(data)) {
    return null;
byte[] imageAsBytes = Base64.decode(data, Base64.DEFAULT);
Bitmap bitmap = BitmapFactory.decodeByteArray(imageAsBytes, 0,
        imageAsBytes.length);
return bitmap;