I use this library https://github.com/jdamcd/android-crop to crop image but i have a problem with the preview which is too small.i have this result:
http://i.stack.imgur.com/FxVKA.png
How to fix this ? i used a samsung galaxy s4 and a samsung tab 3, and i also used other crop library but same problem.
Here is all i do to call the activity:
new Crop(source).output(outputUri).asSquare().start((Activity)context);
I recommend another Image Crop library.
https://github.com/naver/android-imagecropview
please try this :)
If anyone is still stucked with this problem, here is the solution. The reason, why you are getting a small preview in the android-crop library, is that you are trying to work with a thumbnail of image, which you extract like intent.getData()
. Don't do this, create a new empty file and set it's Uri in intent's extra with key MediaStore.EXTRA_OUTPUT
. Then, on onActivityResult
just use android-crop library method Crop.of()
with your Uri, that was setted on intent, and another Uri for a new cropped image.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.