Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Set Digital zoom in Camera

Set Digital zoom in Camera

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    beemaneni
    wrote on last edited by
    #1

    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: 10

        onPinchFinished: {
            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

    Bala B
    Infinite Computer systems
    Chennai

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      Try
      @
      if(cameraPage.isCamera == true){
      cameraBack.digitalZoom = pincharea.scale
      }
      @

      157

      1 Reply Last reply
      0
      • B Offline
        B Offline
        beemaneni
        wrote on last edited by
        #3

        no dude...that doesnt work out..:-(

        Thanks

        Bala B
        Infinite Computer systems
        Chennai

        1 Reply Last reply
        0
        • B Offline
          B Offline
          beemaneni
          wrote on last edited by
          #4

          Hi
          I could solve it bt nt completely...
          here is the code..
          @if(cameraPage.isCamera == true){
          cameraBack.digitalZoom = pincharea.scale
          }@

          Thanks

          Bala B
          Infinite Computer systems
          Chennai

          1 Reply Last reply
          0
          • p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #5

            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.

            157

            1 Reply Last reply
            0
            • B Offline
              B Offline
              beemaneni
              wrote on last edited by
              #6

              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 :-)

              Bala B
              Infinite Computer systems
              Chennai

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved