1. 程式人生 > >在drawable檔案中的圖片獲取bitmap物件

在drawable檔案中的圖片獲取bitmap物件

Resources res = getResources();

Bitmap bitmap = BitmapFactory.decodeResource(res, id);

id為R.drawable.圖片名稱