안드로이드/Image
Bitmap <-> BitmapDrawable
설.현.아빠
2011. 8. 10. 10:42
Bitmap -> Drawable
Bitmap bitmap = new Bitmap (...);
Drawable drawable = new BitmapDrawable(bitmap);
Drawable -> Bitmap
Bitmap bitmap = Bitmap.createBitmap(width, height, true);
Drawable iconDrawable =
packageManager.getActivityIcon(resolveInfo.activityInfo);
Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, width, height);
drawable.draw(canvas);
에러날때는 아래를 참조