Here you can find the source of ByteStringToBitmap(ByteString bytes)
public static Bitmap ByteStringToBitmap(ByteString bytes) throws IOException
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; import android.graphics.BitmapFactory; import com.google.protobuf.ByteString; import java.io.ByteArrayInputStream; import java.io.IOException; public class Main { public static Bitmap ByteStringToBitmap(ByteString bytes) throws IOException { Bitmap bitmap;/* w ww .ja v a 2 s . c om*/ ByteArrayInputStream inputStream = new ByteArrayInputStream( bytes.toByteArray()); bitmap = BitmapFactory.decodeStream(inputStream).copy( Bitmap.Config.ARGB_8888, true); inputStream.close(); return bitmap; } }