getScaleFactor
Returns a float (0, +infinity) indicating a scale factor to apply to the source width and height when displayed in the requested width and height.
The returned scale factor will be split into a power of two sample size applied via inSampleSize and a float scale factor applied after downsampling via inTargetDensity and inDensity. Because of rounding errors the scale factor may not be applied precisely.
The float scaling factor will only be applied on KitKat+. Prior to KitKat, only the power of two downsampling will be applied.
Parameters
The width in pixels of the image to be downsampled.
The height in pixels of the image to be downsampled.
The width in pixels of the view/target the image will be displayed in.
The height in pixels of the view/target the image will be displayed in.