Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04d094d7 authored by tibbi's avatar tibbi
Browse files

correcting some photo exif value parsing

parent 06e73bca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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'
    }
+2 −2
Original line number Diff line number Diff line
@@ -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  "
        }
    }