유용한 정보/안드로이드 개발
[Android] convert drawable to bitmap
Jyui
2013. 1. 21. 17:26
FROM drawable TO bitmap :
Drawable d = ImagesArrayList.get(0);
Bitmap bitmap = ((BitmapDrawable)d).getBitmap();
FROM resource id of drawable TO bitmap:
Bitmap b1 = BitmapFactory.decodeResource(context.getResources(), R.drawable.icon_resource);
Reference:
http://stackoverflow.com/questions/3035692/how-to-convert-a-drawable-to-a-bitmap