-
Notifications
You must be signed in to change notification settings - Fork 119
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
Are the axis inverted when cropping? #160
Comments
@frodriguez-hu Could you provide an example so I can easy reproduce this issue ? |
This is what i am doing @retyui :
I have to invert the axis to make it work |
I just have some coordinates on other NxM Dimensions and I want to crop the image with those dimensions |
And also I mean, with inverted axis, this should work:
But x is cutting it in the middle or near of (real y axis on displayed image) |
What was used to take a photo ? |
|
well, there was a known issue with RN-vision-camera: mrousavy/react-native-vision-camera#2515 on Android but I need to test it on my end as PR for the issue was merged: mrousavy/react-native-vision-camera#2932 |
thx for reporting it |
I am using the last React Native VC version |
Do you know if there are a workaround to handle it correctly on android? |
@retyui It worked well using |
@frodriguez-hu An orientation prop from the For example: const photo = await cameraRef.current.takePhoto({ flash: 'off' });
const isPortrait = photo.orientation.includes('portrait');
const width = isPortrait ? photo.height : photo.width;
const height = isPortrait ? photo.width : photo.height;
ImageEditor.cropImage(`file://${photo.path}`, {
size: {width, height}, |
Ask your Question
I realized that when I modify the
x
it has impact on they
axis on the final output an viceversaThe text was updated successfully, but these errors were encountered: