I have a large number of resources in my drawable folder.All are having big size more than 500KB. I have to load all these 25 images all at once in a srollView. As usual I r
I like shortcuts so I prefer using this.
For creatting file from drawable see this.
Put this in your build.gradle
compile 'id.zelory:compressor:1.0.4'
And wherever you want to compress the image put
Bitmap compressedImageFile = Compressor.getDefault(context).compressToBitmap(your_file);
README.md provides much more information. Sorry for bringing the answer after 6 years.