Thumbnail of an image from resources
问题 I want to make a thumbnail of an image.The image is in the resourse-drawable.Can anyone help me. 回答1: try this code im=(ImageView)findViewById(R.id.imageView1); byte[] imageData = null; try { final int THUMBNAIL_SIZE = 64; //InputStream is=getAssets().open("apple-android-battle.jpg"); FileInputStream fis = new FileInputStream("/sdcard/apple.jpg"); Bitmap imageBitmap = BitmapFactory.decodeStream(fis); Float width = new Float(imageBitmap.getWidth()); Float height = new Float(imageBitmap