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. How to Read and write metadata from/to jpeg/png image from qml/qt?

How to Read and write metadata from/to jpeg/png image from qml/qt?

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 5 Posters 7.1k 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.
  • B Offline
    B Offline
    beemaneni
    wrote on last edited by
    #1

    Hi
    Can anyone tell me what are the methods available for reading and writing metadata in qml/qt?
    I need to write thumbnail image to jpeg image from qml?
    How do i do?
    I have checked with setMetadata(key,value). i could write only few parameters such as make,description...Now i need to write thumbnail.How do i do?

    Thanks in advance

    Bala Beemaneni

    Bala B
    Infinite Computer systems
    Chennai

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Metadata in Qt means QObject meta data, so the information about class name, object name, available signals, slots, and access points to parent and children. It has nothing to do with JPEG EXIF data. Qt does not have any built-in mechanism for reading and writing EXIF, you need to use an external library for that. At least as far as I know. There seems to be some meta data available through QMediaObject class, but I have never used it.

      (Z(:^

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

        I think OP is referring to "this":http://qt-project.org/doc/qt-5/qml-qtmultimedia-camerarecorder.html#setMetadata-method.
        Did you try setting "ThumbnailImage":http://qt-project.org/doc/qt-5/qmediametadata.html#ThumbnailImage-var as the key ?

        157

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

          Hi p3c0

          yeah i referre that and added few exif data such as description,title,make...but ThumbnailImage requires input as a QImage.How do i pass QImage in qml.Here i get struck up...
          ?

          Thanks
          bala beemaneni

          Bala B
          Infinite Computer systems
          Chennai

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

            Not sure but try passing it as a var.

            157

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

              sure..i will try with that.meanwhile if u get something please post it here...

              Thanks
              bala beemaneni

              Bala B
              Infinite Computer systems
              Chennai

              1 Reply Last reply
              0
              • C Offline
                C Offline
                Carlos Ospina
                wrote on last edited by
                #7

                Hello All, I hope is not too late

                You could use a library like exiv2 to read and write metadata EXIF, IPTC and XML metadata. To do that, what I did was follow this guide: "Success: sharing the process of compiling the latest Exiv2 on Win7 (MinGW) + linking from Qt" (http://dev.exiv2.org/boards/3/topics/1259)

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi and welcome to devnet,

                  Otherwise there's also QExifImageHeader

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  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