Perspective
Perspective copied to clipboard
Where does Perspective save edited images?
Where can I find the images edited by Perspective?
They are saved in "Pictures\Perspective" but you should be able to find them in the Gallery application. Unfortunately with the latest android versions my method to add them to Gallery does not works. I change the method but it will be for the next release.
Can you please try with a file explorer if the files are present in "Pictures\Perspective" folder ?
That's where I checked as well, there's no /sdcard/Pictures/Perspective.
Android 10, LineageOS.
It's strange the "sdcard" in the path. The full path is actually "/storage/emulated/0/Pictures/Perspective" but maybe "/storage/emulated/0/" don't exists on all devices.
@danopdev On my device, /sdcard/ just redirects to /storage/emulated/0/, which does exist.
It's strange. I'll try to find another method to get Pictures folder. Do you know the path on your device ?
It's /storage/emulated/0/Pictures/.
Comparing yours to PixaPencil's code,
Perspective: Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).absolutePath
PixaPencil: File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES)
Could it be because yours has the extra Public bit? Might also be .absolutepath.
Actually Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).absolutePath is the current code, but previous release used a hardcoded location.
On my device both methods returns: /storage/emulated/0/Pictures
Can you see please check what are the values for both methods ?
@danopdev How do I check that?
It still won't work on version 1.8.
You need to write a small program for that, but I can try a different approach:
If I generate 2 special builds:
- File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES) + "\Perspective"
- File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES)
Can you please test them ?
Sure, I can test them.
In the ZIP file you can find the 2 applications:
- 1.10 = > try to save to File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES)
- 1.12 => try to save to File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_PICTURES) + "\Perspective"
Please try both of them (I have a preference for 1.12)
Tried both out, none works. Kotatsu, Imagepipe, PxerStudio, Resplash all work for reference.
This is really strange. Do you have the little toast saying the save was OK or failed ?
Yeah, the toast's there. It says Saved to image_name.png.
OK, I didn't checked the save result. This is a new build that do it and also show the full path in the toast. Can you please try it ? Also can you try to save it as JPEG too ? Perspective.zip
I tried all the outputs, they all result in the same error: Failed to save: /storage/emulated/0/Pictures/Perspective/image_name.jpeg. Manually creating the Perspective directory won't help either.
At least it's consistent with the result :) What if you manually create the folders "Pictures/Perspective" ? If still don't works, I'm out of ideas.
Nope, still won't work even with Pictures/Perspective/ present.
The only thing left is that I use OpenCV to write the file (it support TIFF & 16 bit PNG). But this is not that important. I will try to use android system to save the file.
Last chance. This time I try to save the file using android libraries and not OpenCV. Can you please give it a try ? Perspective_1.14.apk.zip
@danopdev Once again, it fails.