title: Android: bitmap.getByteCount() in API lesser than 12
body: <p>When i searched for how to find the size of an image before saving it on the SD card, i found this:</p>
  
  <pre><code>bitmap.getByteCount();
  </code></pre>
  
  <p>but that method is added in API 12 and i am using API 10. So again i found out this:</p>
  
  <p><strong>getByteCount() is just a convenience method which does exactly what you have placed in the else-block. In other words, if you simply rewrite getSizeInBytes to always return "bitmap.getRowBytes() * bitmap.getHeight()"</strong> </p>
  
  <p>here:</p>
  
  <p><a href="https://stackoverflow.com/questions/6428193/where-the-heck-is-bitmap-getbytecount#comment-12827232">Where the heck is Bitmap getByteCount()?</a></p>
  
  <p>so, by calculating this <code>bitmap.getRowBytes() * bitmap.getHeight()</code> i got the value <code>120000 (117 KB)</code>.</p>
  
  <p>where as the image size on the SD card is <code>1.6 KB</code>.</p>
  
  <p>What am i missing? or doing wrong?</p>
  
  <p>Thank You</p>