title: java.lang.ArithmeticException: divide by zero when compress image from pick gallery
body: <p>I'm getting error <code>java.lang.ArithmeticException: divide by zero</code> when compress image from pick gallery. this Is my code: </p>
  
  <pre><code> public String compressImage(String filePath, String outputFilename) {
  
          Bitmap scaledBitmap = null;
  
          BitmapFactory.Options options = new BitmapFactory.Options();
  
          options.inJustDecodeBounds = true;
          Bitmap bmp = BitmapFactory.decodeFile(filePath, options);
  
          int actualHeight = options.outHeight;
          int actualWidth = options.outWidth;
          Log.i("INFO", "ActualHeight Input: " + actualHeight);
          Log.i("INFO", "ActualWidth Input: " + actualWidth);
  
          float maxHeight = 816.0f;
          float maxWidth = 612.0f;
          float imgRatio = actualWidth / actualHeight;
          float maxRatio = maxWidth / maxHeight;
  
  
         ............
  
          return outputFilename;
      }
  </code></pre>
  
  <p>the error get in lin : <code>float imgRatio = actualWidth / actualHeight;</code> so how to fix it?</p>