android bitmap的放大缩小

private static Bitmap big(Bitmap bitmap) {

  Matrix matrix = new Matrix();

  matrix.postScale(1.5f,1.5f); //长和宽放大比例

  matrix.postScale(0.8f,0.8f); //长和宽缩小的比例

  Bitmap resizeBmp = Bitmap.createBitmap(bitmap,0,0,bitmap.getWidth(),bitmap.getHeight(),matrix,true);

  return resizeBmp;

 }

 

Posted in 手机相关 by 傻猫 at July 26, 2013.
Tags: Android, bitmap

添加新评论