mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #643, properly handle saving edited images with file uri
This commit is contained in:
@ -144,6 +144,9 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||
override fun onCropImageComplete(view: CropImageView, result: CropImageView.CropResult) {
|
||||
if (result.error == null) {
|
||||
if (isCropIntent) {
|
||||
if (saveUri.scheme == "file") {
|
||||
saveBitmapToFile(result.bitmap, saveUri.path)
|
||||
} else {
|
||||
var inputStream: InputStream? = null
|
||||
var outputStream: OutputStream? = null
|
||||
try {
|
||||
@ -162,6 +165,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||
setResult(RESULT_OK, this)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
} else if (saveUri.scheme == "file") {
|
||||
SaveAsDialog(this, saveUri.path, true) {
|
||||
saveBitmapToFile(result.bitmap, it)
|
||||
|
Reference in New Issue
Block a user