How to Read and write metadata from/to jpeg/png image from qml/qt?
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
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.
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 ?
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...
Not sure but try passing it as a var.
sure..i will try with that.meanwhile if u get something please post it here...
Carlos Ospina last edited by
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)
Hi and welcome to devnet,
Otherwise there's also QExifImageHeader