What EXIF lib can I use from a Qt program (on embe

2019-02-13 12:50发布

问题:

Can anybody recommend a nice exif lib for tiff img that can be used with a Qt program? I would like to both read and write exif data.

Please note that that I need a license that is compatible with a closed source program, so a lib that is using LGPL or a BSD style license would be really nice.

My first plan was to use QExifImageHeader and QExifValue in Qt Extended, but then I noticed that Extended never got the LGPL licence and is on top of that it is discontinued....

The platform used is Embedded linux.

Thanks Johan


Update:

Since I'm adding a bounty for this question, I'm refining the question to be about to add exif data on a tiff image from a Qt program.

A nice lib to use and a example on how to use it would be really nice.

回答1:

Even if it is not Qt-related, probably your best option is the libexif C EXIF library. It is a GNOME core library (thus is widely deployed, tested and documented), still it is completely toolkit-agnostic, has no dependences and is LGPL licensed. It is a C library, thus its API is not idiomatic of Qt, nonetheless it is powerful and easy to use.

I've seen a lot of Qt-based software that prefer to use the exiv2 library, which is written in C++, but exiv2 is GPL (with option to buy a commercial license) and offers more or less the same functionality of libexif. My suggestion is to try libexif and, only if it does not satisfy your requirements, try exiv2.



回答2:

You can use the libjpeg-exif library, it includes tools manipulate and read EXIF data.