When i capture an image from the camera (from the device home screen) and check the image size on the SD card, it shows between 300-500 Kb.
But when i capture an image in my Application using the Camera Intent, and save it on SD card(in a new folder) it shows image size between 5-10 Kb.
This is the code i am using to save the Image on the SD card after taking the picture in the onActivityResult:
Bitmap bit = (Bitmap) data.getExtras().get("data");
ByteArrayOutputStream bao = new ByteArrayOutputStream();
bit.compress(Bitmap.CompressFormat.JPEG, 100, bao);
byte[] ba = bao.toByteArray();
File imagesFolder = new File(Environment.getExternalStorageDirectory(), "My - Images");
File f = new File(imagesFolder, "test.jpg");
f.createNewFile();
FileOutputStream fo = new FileOutputStream(f);
fo.write(ba);
fo.flush();
fo.close();
how to save it as the original sized image(300-500 Kb)?
and is there a way to get the image size before i save it on the SD card??
Thank You