android - java.lang.ArithmeticException: divide by zero when compres image from pick galery -


i getting error java.lang.arithmeticexception: divide zero when compres image pick galery. 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;     } 

the error in lin : float imgratio = actualwidth / actualheight; how fix ?

the fact getting exception says division 0 occurring, , options.outheight returning zero. need find out why happening. if log.i("info", "actualheight input: " + actualheight); returns other null, provide more details.


Comments

  1. Android - Java.Lang.Arithmeticexception: Divide By Zero When Compres
    Image From Pick Galery - >>>>> Download Now

    >>>>> Download Full

    Android - Java.Lang.Arithmeticexception: Divide By Zero When Compres
    Image From Pick Galery - >>>>> Download LINK

    >>>>> Download Now

    Android - Java.Lang.Arithmeticexception: Divide By Zero When Compres
    Image From Pick Galery - >>>>> Download Full

    >>>>> Download LINK JG

    ReplyDelete

Post a Comment

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

wpf - C# NAudio - Changing audio playback position still plays a small buffer of old position -

Log not being recorded for quickfix c++ Session -