Bitmap bm = BitmapFactory.decodeResource(context.getResources(),R.drawable.xxx);
//原始尺寸
int width=bm.getWidth();
int height=bm.getHeight();
//缩放比例
float scaleHeight=((float)120)/height;
float scaleWidth=scaleHeight;
// 创建操作图片用的matrix对象
Matrix matrix = new Matrix();
// 缩放图片动作
matrix.postScale(scaleWidth, scaleHeight);
//旋转图片 动作
//matrix.postRotate(45);
// 创建新的图片
Bitmap resizedBitmap = Bitmap.createBitmap(bm,0,0,width, height,matrix,true);