Android对图片要显示的宽和高进行压缩

Posted by PanMin Blog on November 9, 2015

– layout: post # 使用的布局(不需要改) title: Android对图片要显示的宽和高进行压缩 # 标题 subtitle: #副标题 date: 2015-11-09 # 时间 author: PanMin # 作者 header-img: img/post-bg-2015.jpg #这篇文章标题背景图片 catalog: true # 是否归档 tags: #标签 - Android —

private Bitmap decodeSampleBitmapFormPath(String path,int width,int height){
    BItmapFactory.Options options = new BitmapFactory.Options();
    options.inJustDecodeBounds=true;//获得图片大小,但并不把图片加载到内存中
}