uCrop
uCrop copied to clipboard
How can I pass a bitmap and receive a bitmap as result instead of uri
I'm wrting something to deal with image and want to crop it with the help of this uCrop.But it seems the library only accepts uri as image input.Is there a way to pass bitmap directly as input?
You can get bitmap from uri, check this https://stackoverflow.com/a/6228188/13585419`
You can get bitmap from uri, check this https://stackoverflow.com/a/6228188/13585419`
u may not understand what I mean.I KNOW how to get bitmap from uri. What I mean is that the library seems only provide uCrop.of(uri,uri) ,not uCrop.of(bitmap,bitmap). Thus when I need to crop image, I need to save my bitmap to file temporarily and delete it when I get result. It's trouble some and may lose quality.So I wonder if there is a way to user bitmap derectly or hack into the activity.
I don't think they have that. What I do in my apps is, create a temp file as in https://stackoverflow.com/a/6485850/13585419 and then schedule it for deletion like this https://stackoverflow.com/a/16691560/13585419
@wu162 have you get any solution ?