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. QML-Change data in Image Details tab properties
Forum Updated to NodeBB v4.3 + New Features

QML-Change data in Image Details tab properties

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 1.1k 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.
  • N Offline
    N Offline
    neda
    wrote on last edited by neda
    #1

    Hi,
    I use Qt version 5.6.0 with qml from windows 8.1.
    I want to set metadata for captured images in QML.
    I've tried the following code, the program runs on desktop takes the picture and saves it.
    After I open it up with Preview and check the metadata... and nothing special there (no Author key).

    Camera {
                                    id: camera
                                    metaData.author: "neda"
    
    ? 1 Reply Last reply
    0
    • N neda

      Hi,
      I use Qt version 5.6.0 with qml from windows 8.1.
      I want to set metadata for captured images in QML.
      I've tried the following code, the program runs on desktop takes the picture and saves it.
      After I open it up with Preview and check the metadata... and nothing special there (no Author key).

      Camera {
                                      id: camera
                                      metaData.author: "neda"
      
      ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      I don't see an "author" property listed in "metaData" here: http://doc.qt.io/qt-5/qml-qtmultimedia-camera.html

      N 1 Reply Last reply
      0
      • J Offline
        J Offline
        JordanHarris
        wrote on last edited by JordanHarris
        #3

        I've never actually done this, so I'm not sure, but I think this might work after reading the documentation.

        Camera { id: cam }
        
        Button {
            onClicked: {
                cam.imageCapture.setMetadata("Author", "neda");
                cam.imageCapture.capture();
           } 
        } 
        
        N 1 Reply Last reply
        0
        • ? A Former User

          I don't see an "author" property listed in "metaData" here: http://doc.qt.io/qt-5/qml-qtmultimedia-camera.html

          N Offline
          N Offline
          neda
          wrote on last edited by
          #4

          @Wieland

          Thank you.
          I see this link

          I use this code but it does not work.

          Camera {
                                          id: camera
                                          metaData.cameraModel: "lenovo"
          
          1 Reply Last reply
          0
          • J JordanHarris

            I've never actually done this, so I'm not sure, but I think this might work after reading the documentation.

            Camera { id: cam }
            
            Button {
                onClicked: {
                    cam.imageCapture.setMetadata("Author", "neda");
                    cam.imageCapture.capture();
               } 
            } 
            
            N Offline
            N Offline
            neda
            wrote on last edited by neda
            #5

            @JordanHarris

            Thank you.

            I use this code but It does not work.

             imageCapture {
                 onImageMetadataAvailable:{
                    setMetadata(key,value)
                    console.log("Image Metadata Callback : "+key+" = "+value)
                    setMetadata("Title","neda")
                }
            
            
            
            onClicked: {
            camera.imageCapture.setMetadata(camera.metaData.author, "neda")
            //or this code:
            camera.imageCapture.setMetadata("Author", "neda")
            //or this code:
            camera.metaData.author="neda"
            
            camera.imageCapture.capture()
            
            

            Update: I also tried to do that using QImageWriter as follows:

            QImage image("c:/1.jpg");
            QImageWriter writer("c:/11.png", "png");
            writer.setText("Author", "neda");
            writer.write(image);    
            

            But, none of my tries gave me any success (change data in Image Details tab properties). Any idea?

            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