**Code stuff for convert from `Bitmap` to `String Base64`**

```
Bitmap thumbnail = extras.getParcelable("data");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
thumbnail.compress(Bitmap.CompressFormat.JPEG, 100, baos);
thumbnail.recycle();
byte[] b = baos.toByteArray();
String attachment = Base64.encodeToString(b, Base64.DEFAULT);

```

**Code stuff for convert from `String Base64` to `Bitmap`**

```
byte[] encodeByte = Base64.decode(strBase64, Base64.DEFAULT);
Bitmap bitmap = BitmapFactory.decodeByteArray(encodeByte, 0, encodeByte.length);
imageView.setImageBitmap(bitmap);

```

but i get `bitmap = null;`

I also refer [Base64 to Bitmap to display in ImageView](https://stackoverflow.com/questions/30964027/base64-to-bitmap-to-display-in-imageview)

Thanks in advance.