Java.lang.arithmeticexception: Divide By Zero When Compress Image From Pick Gallery
I'm getting error java.lang.ArithmeticException: divide by zero when compress image from pick gallery. this Is my code: public String compressImage(String filePath, String output
Solution 1:
The fact that you are getting the exception says that division by zero is occurring, and that options.outHeight
is returning zero. You need to find out why that is happening.
If Log.i("INFO", "ActualHeight Input: " + actualHeight);
returns you something other than null
, provide us more details.
Post a Comment for "Java.lang.arithmeticexception: Divide By Zero When Compress Image From Pick Gallery"