Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-38106

Camera : onImageSaved and onImageCaptured have different result

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.3.0 Beta1
    • Image formats, Multimedia
    • None
    • Windows 7 64bits
      Qt Android for Windows 32-bit 5.3.0-beta1 (Enterprise)
      Device : Samsung Galaxy S3 (4.3)
    • Android

    Description

      From the declarative-camera example, the images from onImageCaptured and onImageSaved have different orientations, and so onImageCaptured cannot be used as a preview without modification(or retrieve special data) on onImageCaptured.

      Replace PhotoPreview.qml by:

      import QtQuick 2.0
      import QtMultimedia 5.0
      
      Item {
          id: g_mainItem
          property alias source : preview.source
          property alias sourceFile : previewFile.source
          signal closed
      
      
          Image {
              id: preview
              anchors.top: parent.top
              anchors.topMargin: 0
              anchors.right: parent.right
              anchors.bottom: parent.bottom
              anchors.bottomMargin:g_mainItem.height/2
              anchors.left: parent.left
              fillMode: Image.PreserveAspectFit
              smooth: true
          }
          Image {
              id: previewFile
              anchors.top: preview.bottom
              anchors.topMargin: 0
              anchors.right: parent.right
              anchors.bottom: parent.bottom
              anchors.left: parent.left
              fillMode: Image.PreserveAspectFit
              smooth: true
          }
          MouseArea {
              anchors.fill: parent
              onClicked: {
                  parent.closed();
              }
          }
      }

      in declarative-camera.qml:

       Camera {
              id: camera
              captureMode: Camera.CaptureStillImage
      
              imageCapture {
                  onImageSaved:
                  {
                      photoPreview.sourceFile = "file://"+path;
                  }
                  onImageCaptured: {
                      photoPreview.source = preview
                      stillControls.previewAvailable = true
                      cameraUI.state = "PhotoPreview"
                  }
              }
      
              videoRecorder {
                   resolution: "640x480"
                   frameRate: 15
              }
          }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ylopes Yoann Lopes
              julienw Julien W
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes