vue-advanced-cropper
vue-advanced-cropper copied to clipboard
Wrong Width Height recognition
When I upload the following image:
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.
Initially it was a Heic image. And I converted it to jpeg using online converter. Idk may be that is a reason....
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.