`
zhouxiaoli521
  • 浏览: 554274 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Android 创建图片

阅读更多
            InputStream is = context.getResources().openRawResource(R.drawable.app_sample_code);
            Bitmap img2= BitmapFactory.decodeStream(is);


           Bitmap img=((BitmapDrawable)res.getDrawable(R.drawable.youricon)).getBitmap();

 

========================================

Resources r = this.getContext().getResources();
Inputstream is = r.openRawResource(R.drawable.my_background_image);
BitmapDrawable  bmpDraw = new BitmapDrawable(is);
Bitmap bmp = bmpDraw.getBitmap();

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics