80,351
社区成员
发帖
与我相关
我的任务
分享
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(fileString, options);
options.inSampleSize = 16;//缩放的倍数
options.inJustDecodeBounds = false;
BitmapFactory.decodeFile(fileName, options);
用这个进行一个缩放,缩放的比例可以根据图片的大小进行缩放。