引用:http://blog.163.com/itsmallbird@126/blog/static/1691391092011314105439501/

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;
}

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;
}

更多相关文章

  1. Android 控件在布局中按比例放置
  2. Android开发教程--设置ImageView图片的显示比例
  3. 【Android】自定义ImageView高度自适应,宽度成比例缩放
  4. iPhone、Android 社交 App 使用比例大調查(資訊圖表)
  5. android 按比例缩放图片(适屏)
  6. android 视频播放器 android videoView 按不同比例缩放 .
  7. 安卓按比例布局,layout_weight用法

随机推荐

  1. 《第一行代码:Android(第2版)》,作者郭霖
  2. 解决eclipse里android无法关联源码办法
  3. Android屏幕完美适配最全攻略(最权威的官
  4. Android成功刷到beagle board ^_^
  5. 【Cocos2d-x】Cocos2d-x跨Android平台搭
  6. Android AsyncTask完全解析
  7. android TextView XML的一些属性
  8. 五大媒体播放器的Android
  9. GridView或ListView 中android:drawSelec
  10. Boingo为Android提供Wifi网络