Convert drawable to bitmap to avoid ClassCastException

In some cases (when using Espresso for loading images) we don't have BitmapDrawable, so it
causes an exception.