How do I decrease a base64 size without decreasing quality? I'm having a problem with this code because it's too big and it's not saving in the database. How to decrease?
Bitmap thumbnail = (Bitmap) data.getExtras().get("data");
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
thumbnail.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
byte[] b = bytes.toByteArray();
String encodedfile = Base64.encodeToString(b, Base64.DEFAULT);
base64p = encodedfile;