Reputation: 11
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:
https://i.sstatic.net/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);
Upvotes: 0
Views: 449
Reputation: 54
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.
Upvotes: 0
Reputation: 305
I recommend another Image Crop library.
https://github.com/naver/android-imagecropview
please try this :)
Upvotes: 1