-
Notifications
You must be signed in to change notification settings - Fork 55
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
x and y offset is not giving correct values. #21
Comments
hello @O-liverQueen Too large bitmap can't load on memory. If your image under 4000 * 4000, module doesn't resize.(same original bitmap) please check bitmap width thank you :) |
Hello @helloyako I got the requirement to crop the image and send the image with x and y offset, I was able to select and crop image, but the x & y offset position was not correct, the values which i was getting was of the cropped image, which is returned in getCroppedImage() method of CropView Class. After doing all the calculation, i came up with this this formula, which gives you the exact x and y offset of the original image, not for the cropped image. FOR X-AXIS: FOR Y-AXIS: where info is your CropInfo Object. |
@O-liverQueen any solution? i have also same issue |
Hi,
I am trying to get the x and y offset when i cropped the image, the value what i am getting from CropInfo Class is different than the actual result.
First i am getting the CropInfo object and getting all the values, and then i am using your same formula to calculate x and y i-e this
float x = Math.abs(viewImageLeft - cropLeft) / scale;
float y = Math.abs(viewImageTop - cropTop) / scale;
I think this x and y values is giving me the result for scaled bitmap, how can i get the original x and y offset after cropping??
Please help me.
The text was updated successfully, but these errors were encountered: