Im having an issue selecting an image from the gallery, when it is show it appears rotated, as I have read adding the property ‘autotransform’ fix the problem, but this only works on some devices (like iphone) but on the android that I was given to test is not working, (Samsung S8), the photo is rotated, has someone figure out how to solve this problem?
AvatarContainer:
Rectangle {
id: root
signal photoClicked
color: "transparent"
width: dp(200)
height: dp(150)
property alias avatarpath: rdAvatar.source
AppImage {
id: rdAvatar
source: "../../../assets/images/icons/man-avatar.png"
anchors.centerIn: parent
width: dp(125)
height: rdAvatar.width
fillMode: Image.PreserveAspectCrop
autoTransform: true
layer.enabled: true
layer.effect: OpacityMask {
maskSource: mask
}
}
Rectangle {
id: btnOpenCam
color: "transparent"
width: dp(25)
height: btnOpenCam.width
anchors.right: parent.right
anchors.bottom: parent.bottom
Image {
id: photoIco
anchors.fill: parent
source: "../../../assets/images/icons/add_a_photo_black_48pt_1x.png"
}
ColorOverlay {
anchors.fill: photoIco
source: photoIco
color: "#fff"
}
MouseArea {
anchors.fill: parent
onClicked: photoClicked()
//onClicked: nativeUtils.displayImagePicker("")
}
}
Rectangle {
id: mask
width: dp(100)
height: dp(100)
radius: dp(50)
visible: false
}
}
on my page I just call:
Connections {
target: nativeUtils
onImagePickerFinished: {
if (accepted){
avatarContainer.avatarpath = path
}
}
}