Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Bitmap bitmab = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
  2. ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
  3.  
  4. bitmab.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
  5. image = Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.DEFAULT);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement