/**Bitmap放大的方法*/

private static Bitmap big(Bitmap bitmap) { 
    Matrix matrix = new Matrix(); 
    matrix.postScale(1.5f,1.5f);  //长和宽放大缩小的比例 
    Bitmap resizeBmp = Bitmap.createBitmap(bitmap,0,0,bitmap.getWidth(),bitmap.getHeight(),matrix,true); 
    return resizeBmp; 
  }

/**Bitmap缩小的方法*/

  private static Bitmap small(Bitmap bitmap) { 
    Matrix matrix = new Matrix(); 
    matrix.postScale(0.8f,0.8f);  //长和宽放大缩小的比例 
    Bitmap resizeBmp = Bitmap.createBitmap(bitmap,0,0,bitmap.getWidth(),bitmap.getHeight(),matrix,true); 
    return resizeBmp; 
  }

相关文章:

  • 2022-01-17
  • 2021-11-29
  • 2021-10-31
  • 2022-02-16
  • 2021-09-18
  • 2021-07-05
  • 2022-12-23
  • 2021-05-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-09-30
  • 2021-06-04
  • 2022-12-23
相关资源
相似解决方案