1.Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.mingchuseal, newOpts);
2.Drawable drawable = getResources().getDrawable(R.mipmap.mingchuseal);
BitmapDrawable bd = (BitmapDrawable) drawable;
final Bitmap bmm = bd.getBitmap();
资源文件转换为Bitmap的两种方式
猜你喜欢
转载自blog.csdn.net/weixin_37716758/article/details/84554276
今日推荐
周排行