Compress Image in Android using ImageZipper Library

Click Here to Submit Your Article

We all know that good UI is important key factor for app success and for UI informative image is most important. But nowadays we don’t care about the size of that image which makes app bigger and bigger in size. ImageZipper is an image compression library which helps you to compress your images both in default and custom way. It allows you to control you the width, height, format, orientation and quality of Image. It ease out the task to send images to the server.

How to Android Image Compression Using ImageZipper Library?

 

Gradle

Add this to your root build.gradle file:

allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}

Default Compressor

File imageZipperFile=new ImageZipper(this).compressToFile(actualFile);

OK Now Get me Bitmap!!

Bitmap b=new ImageZipper(MainActivity.this).compressToBitmap(actualFile);

See full article here: ImageZipper - Android Image Compression Library

Category: