当前位置: 代码迷 >> Android >> Android 创设图片
  详细解决方案

Android 创设图片

热度:95   发布时间:2016-05-01 14:11:28.0
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();

?

  相关解决方案