catch and show exceptions thrown at rotating saved image
This commit is contained in:
parent
3f6e541bba
commit
ad1a721f8f
|
@ -97,12 +97,16 @@ class PhotoProcessor(val activity: MainActivity, val uri: Uri?, val currCameraId
|
|||
}
|
||||
}
|
||||
|
||||
val fileExif = ExifInterface(path)
|
||||
|
||||
try {
|
||||
image.compress(Bitmap.CompressFormat.JPEG, activity.config.photoQuality, fos)
|
||||
activity.saveImageRotation(path, totalRotation)
|
||||
} catch (e: Exception) {
|
||||
activity.showErrorToast(e)
|
||||
return ""
|
||||
}
|
||||
|
||||
if (activity.config.savePhotoMetadata) {
|
||||
val fileExif = ExifInterface(path)
|
||||
tempExif.copyTo(fileExif)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue