zetbaitsu / Compressor

An android image compression library.
7.08k stars 963 forks source link

width and height > 0 Exception, on correct path #7

Open eliorc opened 8 years ago

eliorc commented 8 years ago

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.

arghyarepos commented 8 years ago

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

TheReprator commented 8 years ago

Same here.

zetbaitsu commented 8 years ago

Try new version bros..

shiguiyou commented 7 years ago

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

mladenrakonjac commented 7 years ago

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

prakharchandna commented 7 years ago

I have same problem on Android 6.0 , Motorola XT1068

mecoFarid commented 6 years ago

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