Compressor icon indicating copy to clipboard operation
Compressor copied to clipboard

width and height > 0 Exception, on correct path

Open eliorc opened this issue 8 years ago • 7 comments

I have double checked the file I'm using for compressToFile() is indeed an image file. I have succeeded using the exact same file for uploading it as is.

Though compressToFile() throws an java.lang.IllegalArgumentException: width and height must be > 0`

This is the calling function

File compressedFile = Compressor.getDefault(this).compressToFile(new File(uri)); Where uri is a string representing the location.

eliorc avatar Jul 21 '16 16:07 eliorc

Same here. I tried all combinations(Uri/Path) but still it is throwing that exception.

arghyarepos avatar Aug 12 '16 14:08 arghyarepos

Same here.

TheReprator avatar Oct 06 '16 14:10 TheReprator

Try new version bros..

zetbaitsu avatar Oct 10 '16 07:10 zetbaitsu

same here in huawei android 6.0 with the new version 1.0.4

File compressedFile = Compressor.getDefault(getApplicationContext()).compressToFile(file);

Caused by: java.lang.IllegalArgumentException: width and height must be > 0

shiguiyou avatar Dec 14 '16 02:12 shiguiyou

I have same problem on Android 7.0 , Nexus 5. Version 1.0.4

mladenrakonjac avatar Mar 14 '17 09:03 mladenrakonjac

I have same problem on Android 6.0 , Motorola XT1068

prakharchandna avatar Mar 29 '17 12:03 prakharchandna

Experiencing the same issue on Samsung Galaxy Note8, Android 7.1 Library version 2.1.0

mecoFarid avatar Sep 02 '18 08:09 mecoFarid