ImageView iv =(ImageView) findViewById(R.id.splashImageView);
Drawable d =iv.getBackground();
BitmapDrawable bitDw =((BitmapDrawable) d);
Bitmap bitmap = bitDw.getBitmap();
System.out.println(".....d....."+d);
System.out.println("...bitDw...."+bitDw);
System.out.println("....bitmap...."+bitmap);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG,100, stream);
byte[] imageInByte = stream.toByteArray();
store byte[] in database
ContentValues cv=new ContentValues();
cv.put(CHUNK, buffer);//CHUNK blob type field of your table
long rawId=database.insert(TABLE,null, cv);//TABLEtable name