Android图片压缩工具MCompressor

这是一个简单的图片压缩工具(MCompressor),可自定义压缩的格式和质量,以及压缩后存储的文件路径,可决定对多大的文件进行压缩。

使用方法

build.gradle文件

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:


Step 2. Add the dependency


示例

最简单的使用方法,只需要添加原文件路径即可


对大于500KB的文件进行压缩,压缩的文件格式为JPEG,压缩质量为80%,原文件路径为path,压缩文件保存路径可自定义



原文地址:https://www.cnblogs.com/chenxkang/p/9759885.html