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…
Reference in New Issue