Compressor icon indicating copy to clipboard operation
Compressor copied to clipboard

io exception why ??

Open thealpha opened this issue 6 years ago • 5 comments

            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

thealpha avatar May 15 '18 06:05 thealpha

cannot convert file to bitmap

thealpha avatar May 15 '18 08:05 thealpha

It would be more helpful if you give some crash stack trace. Possible causes would be: The file is not opened properly from URI. File not readable some times. If you give some code regarding converting URI to file that will also help to find the issue.

nareshkatta99 avatar May 18 '18 06:05 nareshkatta99

It is not crashing but it is not letting me to do

thealpha avatar May 18 '18 06:05 thealpha

When I convert URL to file path it shows red line and says io exception

thealpha avatar May 18 '18 06:05 thealpha

Possible causes:

  1. File does not exist
  2. Storage permission not enabled

I am using the library and works great.

Duna avatar May 18 '18 15:05 Duna