BitmapFactory.Options op = new BitmapFactory.Options();
// set sample size will scale the image.size/2 op.inSampleSize = 2;
Bitmap bm = BitmapFactory.decodeResource(PaintBushActivity.this.getResources(), R.drawable.img_0218, op);
ImageView displayImg = (ImageView)PaintBushActivity.this.findViewById(R.id.imageView1);
displayImg.setBackgroundDrawable(bd);
// set sample size will scale the image.size/2 op.inSampleSize = 2;
Bitmap bm = BitmapFactory.decodeResource(PaintBushActivity.this.getResources(), R.drawable.img_0218, op);
ImageView displayImg = (ImageView)PaintBushActivity.this.findViewById(R.id.imageView1);
displayImg.setBackgroundDrawable(bd);
沒有留言:
張貼留言