I am capturing image from camera and onActivityResult()
. I'm rescaling the image to 800 x 600 along with 70% compression factor. While I am doing so I am getting different image sizes for the same camera resolution.
Bitmap pic = BitmapFactory.decodeFile(myPath);
Bitmap bitmap = Bitmap.createScaledBitmap(pic, 800, 600, true);
OutputStream os = null;
File file = new File("MyFile.png");
try {
os = new FileOutputStream(file);
bitmap.compress(Bitmap.CompressFormat.JPEG,70,outputStream);
os.flush();
os.close();
pic = null;
}catch (IOException e){
...
}
The data below is for 5 MP in both the cases but with different device having different android version. The output that i got was:
On GingerBread(2.3.3) the image size that got saved to the SDCard was 130 KB.
On JellyBean(4.2) the image size that got saved to the SDCard was 59.3 KB.