From 58ec3276bb5d5b29e72f064b96ee37dc6581cdd1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 6 Oct 2016 22:32:35 +0200 Subject: [PATCH] lowercase the file extension before checking its type --- .../com/simplemobiletools/gallery/activities/EditActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt index af5aea4ae..8c6b7ac98 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/EditActivity.kt @@ -84,7 +84,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener } private fun getCompressionFormat(file: File): Bitmap.CompressFormat { - return when (file.extension) { + return when (file.extension.toLowerCase()) { "png" -> Bitmap.CompressFormat.PNG "webp" -> Bitmap.CompressFormat.WEBP else -> Bitmap.CompressFormat.JPEG