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. [SOLVED] Camera: location of the saved images?
QtWS25 Last Chance

[SOLVED] Camera: location of the saved images?

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 4 Posters 5.4k Views
  • 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.
  • S Offline
    S Offline
    strekazoid
    wrote on last edited by
    #1

    I'm trying to implement a simple camera app that snaps picture and saves it locally:

    @Camera {
    id: camera
    x: 0
    y: 0
    anchors.fill: parent
    focus: visible //to receive focus and capture key events
    captureResolution : "640x480"

            flashMode: Camera.FlashAuto
            whiteBalanceMode: Camera.WhiteBalanceAuto
    
            onImageCaptured : {
                captureButton.text = "Captured"
            }
    
            onImageSaved: captureButton.text = "Saved!"
    
    
    
        }
    
        Button {
            id: captureButton
            x: 130
            y: 506
            text: "Capture"
    
            SoundEffect {
                id: captureSound
                source: "cameraappCapture1.wav"
            }
    
            onClicked: {
                captureSound.play()
                camera.captureImage()
    
    
            }
        }@
    

    With this I'm able to launch the camera and snap some pictures. It seems that those pictures are saved somewhere; but I can't see them in the Phone Gallery app. Where are they going?

    Also that sound effect doesn't play any sound for me, even though I have copied the file locally to the same folder where the QML files are.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      srikanth_trulyit
      wrote on last edited by
      #2

      If you are developing for symbian did you check app private folder (QCoreAppplication::applicationDirPath()) ?

      Also onImageSaved() has a string parameter, any clue from that?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        minimoog77
        wrote on last edited by
        #3

        [quote]Also onImageSaved() has a string parameter, any clue from that?[/quote]

        String parameter is path where camera image was saved.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          strekazoid
          wrote on last edited by
          #4

          Thanks for the hints!

          Seem that camera is always saving image to c:\Data\Images\Image.jpg. This is kind of a problem, especially if you take multiple images. Is there any way to configure path for saving images?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            minimoog77
            wrote on last edited by
            #5

            Briefly looking at the documentation, you cannot configure path for saving images.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              You should be able to rename/move the image after taking it, right? Would perhaps take a little bit of C++ code to do, but that should not be hard at all.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                strekazoid
                wrote on last edited by
                #7

                The perfect behavior for Camera element would be to save images automatically to the Gallery, I think.

                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