标签:压缩 位图 图片 android bitmapfactory
BufferedInputStream in = new BufferedInputStream( new FileInputStream(new File(path))); BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = false; options.inSampleSize = 2;//宽和高变为原来的1/2,即图片压缩为原来的1/4 Bitmap bitmap = BitmapFactory.decodeStream(in, null, options);
版权声明:本文为博主原创文章,未经博主允许不得转载。
Android学习之利用BitmapFactory工厂压缩图片
标签:压缩 位图 图片 android bitmapfactory
原文地址:http://blog.csdn.net/u012527802/article/details/47817529