Compressor
Compressor copied to clipboard
An android image compression library.
My compress function is inside non-Ui thread. What should I do? I did something like this. I moved this function inside asynctask. Is this the right way and do you...
In log its displaying the correct path : say /stotage/emulated/mydir/ But not creating the compressed file inside /stotage/emulated/mydir/ location. ``` Log.e(TAG,"folder path ="+dirFileStorage.getPath()+File.separator); File compressedImageFile = new Compressor(getActivity()).setQuality(50) .setDestinationDirectoryPath(dirFileStorage.getPath()+File.separator). compressToFile(f);...
File filepath = new File(file.getPath()); Bitmap thumb = new Compressor(this).compressToBitmap(filepath); I am converting uri to file and then compressing to bitmap but it showing I0-exception
Hi,this is also my question,can you tell me how to fix it?
FATAL EXCEPTION: main java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:650) at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:389) at id.zelory.compressor.ImageUtil.decodeSampledBitmapFromFile(ImageUtil.java:49) at id.zelory.compressor.ImageUtil.compressImage(ImageUtil.java:27) at id.zelory.compressor.Compressor.compressToFile(Compressor.java:60) at id.zelory.compressor.Compressor.compressToFile(Compressor.java:56) at com.lly.testdemo.ImageCompressor$1.onClick(ImageCompressor.java:61) at android.view.View.performClick(View.java:4211) at android.view.View$PerformClick.run(View.java:17267) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at...
I found the compress image, and opened in chrome browser it is fine, but when I opened in different browser like (Mozilla, safari) it showing image is corrupted.
Sir i think the compressor doesn't work properly for nougat
I want to compress my image from around 5mb to below 65kb How can i do that? Can you help me please?