Skip to content
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

Wrong Width Height recognition #271

Open
VladimirFrunza opened this issue Mar 20, 2024 · 3 comments
Open

Wrong Width Height recognition #271

VladimirFrunza opened this issue Mar 20, 2024 · 3 comments

Comments

@VladimirFrunza
Copy link

When I upload the following image:
echipa fete 4
It have width 4000 and height 6000.
Vue cropper
in this lines
const {image} = cropperElement.value.getResult()
imageWidth.value = image.width
imageHeight.value = image.height

recognizes this image as width = 6000 and height = 4000. have no idea why. Please try yorself.

@VladimirFrunza
Copy link
Author

Initially it was a Heic image. And I converted it to jpeg using online converter. Idk may be that is a reason....

@VladimirFrunza
Copy link
Author

Uploading echipa fete 4.jpeg…

@nik736
Copy link

nik736 commented Nov 3, 2024

Did you find a solution? I have the same issue with iOS images. My image is 4284x5712 but when fetching width/height with:

const { image } = this.$refs.cropper.getResult()
console.log("width", image.width)
console.log("height", image.height)

It shows a height of 5712px and width 4284px which is the other way around. This happens with JPG and HEIC images shot on iPhone. So it's a general issue with iOS it seems.

Edit: I have an issue with rotating this images, since the size is not correct and rotate is not rotating correctly this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants