The following code completely destroys the quality of the image I am capturing with my android camera. How can I compress slightly without ruining the image quality
Bundle extras = data.getExtras();
Bitmap bitmap = (Bitmap) data.getExtras().get("data");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);
byte[] dataBAOS = baos.toByteArray();