[SOLVED] Camera: location of the saved images?



  • 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.



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

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



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

    String parameter is path where camera image was saved.



  • 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?



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



  • 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.



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.