With mobile development, showing images in an app has become a very frequent task. But with the ever-increasing resolution of smartphone cameras, image compression has become a rather important concern. Although there are already a lot of writings on the internet on the topic, a great number of possible scenarios still have to be thought of, like unsuccessful compressions, too small pictures (eg. for profile pictures) or too bad image quality. Naturally, the first idea was to see how WeChat, the app giant manages this task in action. To gather data, 100 images with different resolutions were sent through WeChat Moments, then the compressed images were compared with the original ones. Luban's foundation is the result of this analysis on WeChat's compression method. Because the process was analyzed backward, Luban's efficacy is not yet exactly the same as that of WeChat, but the results are already very close to what WeChat Moments' image compression produces.
Features
- Image compressing tool for Android
- Efficacy very close to that of WeChat
- Luban internally uses the IO thread to perform image compression
- Implementations only need to specify what happens when the process finishes successfully
- With RxJava, more freedom is left to the programmer on controlling the process
- Licensed under the Apache License