Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(),
R.drawable.xxxxx); int width = bitmapOrg.width();
int height = bitmapOrg.height();
float scaleWidth = 0.5;
float scaleHeight = 0.5; Matrix matrix = new Matrix(); // resize the bit map
matrix.postScale(scaleWidth, scaleHeight);
// recreate the new Bitmap
Bitmap resizedBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0,
width, height, matrix, true); 作为参考
很好,ThumbnailUtils里面主要的内容也就是这部分了。