calculateInSampleSize

fun calculateInSampleSize(srcWidth: Int, srcHeight: Int, dstWidth: Int, dstHeight: Int, scale: Scale): Int

Calculate the BitmapFactory.Options.inSampleSize given the source dimensions of the image (srcWidth and srcHeight), the output dimensions (dstWidth, dstHeight), and the scale.