Closed hpmdr closed 8 years ago
设置了压缩后最大体积为250KB(setMaxSize(250))一张180KB的图片压缩后变成230KB,建议在customCompress()方法大小判断: long fileSize = mMaxSize > 0 ? mMaxSize : file.length() / 1024; 中再加一个判断: long fileSize =( mMaxSize > 0 && mMaxSize < file.lengh())? mMaxSize : file.length() / 1024;
long fileSize = mMaxSize > 0 ? mMaxSize : file.length() / 1024;
long fileSize =( mMaxSize > 0 && mMaxSize < file.lengh())? mMaxSize : file.length() / 1024;
嗯嗯,可以考虑加上,谢谢指正
设置了压缩后最大体积为250KB(setMaxSize(250))一张180KB的图片压缩后变成230KB,建议在customCompress()方法大小判断:
long fileSize = mMaxSize > 0 ? mMaxSize : file.length() / 1024;
中再加一个判断:long fileSize =( mMaxSize > 0 && mMaxSize < file.lengh())? mMaxSize : file.length() / 1024;