title: how to get the current image background id
body: <p>how to get the current image background id</p>
  
  <p>my code is</p>
  
  <pre><code>int d = iv.getId();
  Bitmap image = BitmapFactory.decodeResource(getResources(),d);
  
  // convert bitmap to byte
  ByteArrayOutputStream stream = new ByteArrayOutputStream();
  image.compress(Bitmap.CompressFormat.JPEG, 100, stream);
  byte imageInByte[] = stream.toByteArray();
  
  //Log.e("insert",a);
  db1.addFavorite(imageInByte);
  e1.setText("");
  </code></pre>
  
  <p>but it doesn't work.</p>