correcting some photo exif value parsing
This commit is contained in:
parent
06e73bca0b
commit
04d094d744
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ buildscript {
|
|||
propMinSdkVersion = 16
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '4.3.26'
|
||||
propVersionName = '4.3.27'
|
||||
kotlin_version = '1.2.50'
|
||||
support_libs = '27.1.1'
|
||||
}
|
||||
|
|
|
@ -77,14 +77,14 @@ fun String.getExifProperties(exif: ExifInterface): String {
|
|||
exif.getAttribute(ExifInterface.TAG_FOCAL_LENGTH).let {
|
||||
if (it?.isNotEmpty() == true) {
|
||||
val values = it.split('/')
|
||||
val focalLength = "${Math.round(values[0].toDouble() / values[1].toDouble())}mm"
|
||||
val focalLength = "${values[0].toDouble() / values[1].toDouble()}mm"
|
||||
exifString += "$focalLength "
|
||||
}
|
||||
}
|
||||
|
||||
exif.getAttribute(ExifInterface.TAG_EXPOSURE_TIME).let {
|
||||
if (it?.isNotEmpty() == true) {
|
||||
val exposureSec = (1 / it.toFloat()).toInt()
|
||||
val exposureSec = Math.round(1 / it.toFloat())
|
||||
exifString += "1/${exposureSec}s "
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue