Notice
Recent Posts
Recent Comments
Link
관리 메뉴

설.현.아빠

Bitmap <-> BitmapDrawable 본문

안드로이드/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); 



에러날때는 아래를 참조


http://blog.vizpei.kr/105116344

Comments