Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Write (duplicate) Exif to a Jpg
Qt 6.11 is out! See what's new in the release blog

Write (duplicate) Exif to a Jpg

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.8k 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.
  • A Offline
    A Offline
    alexislg
    wrote on last edited by
    #1

    Hey all,
    I'm starting a new project for resizing JPG pictures. Sound very easy with QImage, I managed to do that with a few lines of code. BUT the problem is that QImage does not keep the EXIF metadata of the original image. So I get a resized image but without its EXIF.
    This is a big problem for me as a photographer. I have googled a lot this problem and I found the QExifImageHeader class that has a savetojpeg() function that works well on picture that already have their own exif but when I use this function on a resized jpeg without exif, I get a corrupt jpg file.
    So I guess that QExifImageHeader can only modify the exifs of an image but not modify them.
    Anybody tried this before? What can I do?
    Thanks!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexislg
      wrote on last edited by
      #2

      I would like to use Exiv2 library which is in C++. How can I do that?
      I'm using Qtcreator with Qt4.8.5 and MinGW on windows.
      I have never used any external C++ library and I really don't know where to start. I heard to use DLL but I have no idea where to find these DLL neither how to install them with Qtcreator.
      http://www.exiv2.org/download.html

      Any help?

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

        Hi and welcome to devnet,

        For your first question, I would suggest that you ask it on the interest mailing list, you'll find there Qt's maintainers/developers (this forum is more user oriented)

        For the second, it's outside of the scope of this forum. However, you should start by searching something like "build exiv2 mingw" on your favorite search engine to find instructions for that.

        Qt Creator helps you add libraries to your project, just right click on the project in the Projects explorer and select add a library, the rest is pretty straight forward.

        Happy coding !

        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
        • G Offline
          G Offline
          Geraud
          wrote on last edited by
          #4

          This is fairly old but... has anything been changed there? I am fine with using a third-party EXIF library, but I would rather "Qt-fy" my code a bit more.

          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