Why my Image Quality is not good while sending it to server in My Android App?
<p>This is my code to send Image on Server . my image is going to server but not in good quality.     </p>

<pre><code>photo = (Bitmap) data.getExtras().get("data");
image_from_camera.setImageBitmap(photo);
if(photo != null)
{
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    photo.compress(Bitmap.CompressFormat.JPEG, 50, stream);

    //Here if I increase the size of quality like up to 
    //photo.compress(Bitmap.CompressFormat.JPEG, 100, stream);
    //then i am getting BAD REQUEST ERROR i.e request exceeds size limit.
    byte[] byte_arr = stream.toByteArray();
    image_string_chore_detail = Base64.encodeToString(byte_arr,Base64.DEFAULT);

    System.out.println(
        "IMAGE STRING IN CHORE DETAILS::  "+image_string_chore_detail);
}
</code></pre>

<p>So please help me what to do....</p>
