title: Drawable to byte[]
body: <p>I have an image from the web in an <code>ImageView</code>. It is very small (a favicon) and I'd like to store it in my SQLite database.
  I can get a <code>Drawable</code> from <code>mImageView.getDrawable()</code> but then I don't know what to do next. I don't fully understand the <code>Drawable</code> class in Android.</p>
  
  <p>I know I can get a byte array from a <code>Bitmap</code> like:</p>
  
  <pre><code>Bitmap defaultIcon = BitmapFactory.decodeStream(in);
  
  ByteArrayOutputStream stream = new ByteArrayOutputStream();
  defaultIcon.compress(Bitmap.CompressFormat.JPEG, 100, stream);
  
  byte[] bitmapdata = stream.toByteArray();
  </code></pre>
  
  <p>But how do I get a byte array from a <code>Drawable</code>?</p>