-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return cropped image width/height in onActivityResult #149
Labels
Comments
need it, too. Because i just need the final cropped Rect,so will you support it ? Thanks. |
Thanks for the issue. I've added this info to the ActivityResult bundle, available in the next library update soon. |
Please check the latest uCrop version Lightweight general solutioncompile 'com.yalantis:ucrop:2.2.0' Get power of the native code to preserve image quality (+ about 1.5 MB to an apk size)compile 'com.yalantis:ucrop:2.2.0-native' |
@shliama I have download the latest version and tested,it works well.Thank you. @Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK && requestCode == UCrop.REQUEST_CROP) {
int width = data.getIntExtra(UCrop.EXTRA_OUTPUT_IMAGE_WIDTH, defaultValue);
int height = data.getIntExtra(UCrop.EXTRA_OUTPUT_IMAGE_HEIGHT, defaultValue);
} else if (resultCode == UCrop.RESULT_ERROR) {
Throwable cropError = UCrop.getError(data);
}
} |
resolved |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it would be great if the cropped ActivityResult would contain the final cropped image width and height as well, the data is already available in
BitmapCropTask
and just needs to be passed through to the BitmapCroppedCallback.As none of the internals are exposed by this library, I think it's acceptable to change the interface of BitmapCroppedCallback.
The text was updated successfully, but these errors were encountered: