show proper exposure values at long exposure photos
This commit is contained in:
parent
3c07e39432
commit
8d3ec80586
2 changed files with 7 additions and 3 deletions
|
@ -7,7 +7,7 @@ buildscript {
|
|||
propMinSdkVersion = 21
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '5.1.10'
|
||||
propVersionName = '5.1.12'
|
||||
kotlin_version = '1.2.71'
|
||||
}
|
||||
|
||||
|
|
|
@ -87,8 +87,12 @@ fun String.getExifProperties(exif: ExifInterface): String {
|
|||
|
||||
exif.getAttribute(ExifInterface.TAG_EXPOSURE_TIME).let {
|
||||
if (it?.isNotEmpty() == true) {
|
||||
val exposureSec = Math.round(1 / it.toFloat())
|
||||
exifString += "1/${exposureSec}s "
|
||||
val exposureValue = it.toFloat()
|
||||
exifString += if (exposureValue > 1f) {
|
||||
"${exposureValue}s "
|
||||
} else {
|
||||
"1/${Math.round(1 / exposureValue)}s "
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue