ExifTool Forum

ExifTool => Developers => Topic started by: agriggio on January 07, 2023, 11:20:06 AM

Title: C++ API and open source apps
Post by: agriggio on January 07, 2023, 11:20:06 AM
Hi,
First post here. I tried searching but nothing showed up, so here's my question: is it possible to use the C++ API in an open source app (specifically GPLv3)? I'm currently using the exiftool binary but it's a bit slow sometimes, so I was wondering whether I could simply use the existing C++ API instead.
Thanks in advance!
Title: Re: C++ API and open source apps
Post by: StarGeek on January 07, 2023, 12:22:20 PM
See the ExifTool License Stickied post (https://exiftool.org/forum/index.php?topic=4002.0) just above your post.

Quote from: agriggio on January 07, 2023, 11:20:06 AMI'm currently using the exiftool binary but it's a bit slow sometimes, so I was wondering whether I could simply use the existing C++ API instead.

Make sure you're not calling exiftool separately for every file.  That is Common Mistake #3 (https://exiftool.org/mistakes.html#M3).

The C++ API is not a C++ version of exiftool, it is simply a wrapper that calls exiftool via the -stay_open option (https://exiftool.org/exiftool_pod.html#stay_open-FLAG).  Exiftool is still required in either the pure Perl or Windows "executable", which is really just the Perl code with a built in Perl interpreter.
Title: Re: C++ API and open source apps
Post by: agriggio on January 08, 2023, 02:44:31 AM
Thanks for the reply. I think I was unclear, so let me try again. I know how the c++ wrapper works, my question is whether such wrapper can be used in GPL code, exactly because I do not want to reimplement the functionality to handle the -stay_open flag myself. If I understand correctly the post you referenced only talks about the exiftool binary, not about the c++ helper library...

Thanks again!
Title: Re: C++ API and open source apps
Post by: Phil Harvey on January 08, 2023, 07:28:37 AM
The C++ wrapper isn't a GPL license, but so far I have been letting people use it for free.  My plan was to only start charging for this if support for it starts taking too much of my time.

- Phil
Title: Re: C++ API and open source apps
Post by: agriggio on January 08, 2023, 07:55:15 AM
Great, thanks a lot!