mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-03-01 10:07:43 +01:00
lowercase the file extension before checking its type
This commit is contained in:
parent
f635173b1f
commit
58ec3276bb
@ -84,7 +84,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getCompressionFormat(file: File): Bitmap.CompressFormat {
|
private fun getCompressionFormat(file: File): Bitmap.CompressFormat {
|
||||||
return when (file.extension) {
|
return when (file.extension.toLowerCase()) {
|
||||||
"png" -> Bitmap.CompressFormat.PNG
|
"png" -> Bitmap.CompressFormat.PNG
|
||||||
"webp" -> Bitmap.CompressFormat.WEBP
|
"webp" -> Bitmap.CompressFormat.WEBP
|
||||||
else -> Bitmap.CompressFormat.JPEG
|
else -> Bitmap.CompressFormat.JPEG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user