android convertion between base64 and bitmap

android convertion between base64 and bitmap

android convert bitmap to base64 string

r‮efe‬r to:lautturi.com
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();  
bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
byte[] byteArray = byteArrayOutputStream .toByteArray();

android convert base64 to bitmap

byte[] decodedString = Base64.decode(encodedImage, Base64.DEFAULT);
Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
Created Time:2017-09-03 13:31:30  Author:lautturi