minor code formatting

This commit is contained in:
tibbi
2022-11-26 17:25:18 +01:00
parent a95472e28f
commit a2f369e9e2

View File

@@ -19,7 +19,7 @@ import com.simplemobiletools.commons.extensions.copyTo
import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.helpers.isQPlus import com.simplemobiletools.commons.helpers.isQPlus
import java.io.* import java.io.*
import java.util.UUID import java.util.*
/** /**
* Inspired by * Inspired by
@@ -116,9 +116,11 @@ class ImageSaver private constructor(
if (metadata.isReversedHorizontal) { if (metadata.isReversedHorizontal) {
exifInterface.flipHorizontally() exifInterface.flipHorizontally()
} }
if (metadata.isReversedVertical) { if (metadata.isReversedVertical) {
exifInterface.flipVertically() exifInterface.flipVertically()
} }
if (metadata.location != null) { if (metadata.location != null) {
exifInterface.setGpsInfo(metadata.location) exifInterface.setGpsInfo(metadata.location)
} }
@@ -274,9 +276,7 @@ class ImageSaver private constructor(
} }
@Throws(IOException::class) @Throws(IOException::class)
private fun copyTempFileToOutputStream( private fun copyTempFileToOutputStream(tempFile: File, outputStream: OutputStream) {
tempFile: File, outputStream: OutputStream
) {
FileInputStream(tempFile).use { inputStream -> FileInputStream(tempFile).use { inputStream ->
val buf = ByteArray(COPY_BUFFER_SIZE) val buf = ByteArray(COPY_BUFFER_SIZE)
var len: Int var len: Int