How to check the physical size of image before saving as jpeg from camera in Android?
<p>I use the following code to save the captured image:  </p>

<pre><code>Bitmap bm = BitmapFactory.decodeByteArray(data, 0, data.length);
FileOutputStream fos = new FileOutputStream(pictureFile);
bm.compress(Bitmap.CompressFormat.JPEG, 100, fos);
</code></pre>

<p>Since I will have further implementaion, I would like to check the physical size of bitmap when it saved in SD card.<br>
If the size is over 1mb, I would like to scale it before saving it as jpeg.<br>
How to do it?<br>
Please give example. Thanks.</p>
