图片文件压缩,options 设置了压缩后大小,但 7M 的原图压缩后还有 800k+
ArvinAndroid opened this issue · comments
chenjun commented
压缩代码如下:
Tiny.FileCompressOptions options = new Tiny.FileCompressOptions();
options.size = 100;
options.isKeepSampling = false;
FileWithBitmapResult result = Tiny.getInstance().source(filePath).asFile().withOptions(options).compressWithReturnBitmapSync();
return result.bitmap;
原图地址为:https://chaoxingqiu2.oss-cn-hangzhou.aliyuncs.com/images/qqimg.jpg