//把传进来的bitmap对象转换为宽度为x,长度为y的bitmap对象
public static Bitmap big(Bitmap b,float x,float y)
{
int w=b.getWidth();
int h=b.getHeight();
float sx=(float)x/w;//要强制转换,不转换我的在这总是死掉。
float sy=(float)y/h;
matrix.postScale(sx, sy); // 长和宽放大缩小的比例
Bitmap resizeBmp = Bitmap.createBitmap(b, 0, 0, w,
h, matrix, true);
return resizeBmp;
}