Set Digital zoom in Camera
-
How do i set Digital zoom in camera on pinchFinished?
@PinchArea {
id: pincharea
anchors.fill: parent
pinch.target: (flipable.flipped == false) ? frontImage : viewfinderBack
pinch.minimumScale: 0.5
pinch.maximumScale: 10onPinchFinished: { if(cameraPage.isCamera == true){ cameraBack.setDigitalZoom(*pincharea.scale*) } } }@
what values should be passed as argument to setDigitalZoom ? the above parameter doesnt zoom it exactly
Thanks in Advance
-
Hi,
Try
@
if(cameraPage.isCamera == true){
cameraBack.digitalZoom = pincharea.scale
}
@ -
That is what i said earlier ;)
Anyway, any changes you did other than that to get it working ? Just for info so that others may find it useful. -
hey i am sorry...i had put wrong code...digitalZoom is read only property..
@ if(cameraPage.isCamera == true){
cameraBack.setDigitalZoom = pinch.scale
}
@
This doesnt complete my problem...as pinch.scale only holds the distance b/w two points.Everytime i start pinch ,pinch.scale becomes default to 1.0..so i have to add@cameraBack.setDigitalZoom=pinch.scale-1.0 +
pinch .previousScale
@I am working on it still...
Thanks :-)