Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imgChild.buildDrawingCache();
- Bitmap bmap = imgChild.getDrawingCache();
- ByteArrayOutputStream stream = new ByteArrayOutputStream();
- bmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
- byte[] byteFormat = stream.toByteArray();
- String imgString = Base64.encodeToString(byteFormat, Base64.NO_WRAP);
- <img src="data:image/png;base64,iVBORw0KGgoAAA....." />
Add Comment
Please, Sign In to add comment