vue-advanced-cropper icon indicating copy to clipboard operation
vue-advanced-cropper copied to clipboard

Wrong Width Height recognition

Open VladimirFrunza opened this issue 1 year ago • 3 comments

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 avatar Mar 20 '24 15:03 VladimirFrunza

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

VladimirFrunza avatar Mar 20 '24 15:03 VladimirFrunza

Uploading echipa fete 4.jpeg…

VladimirFrunza avatar Mar 20 '24 15:03 VladimirFrunza

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.

nik736 avatar Nov 03 '24 15:11 nik736