I'm a co-maintainer of a open source (GPLv2 licensed) image metadata library and recently a contributor made a pull request adding support for the HEIF format via libheif.

Since the HEIF format is a patent-minefield: is there a way for me to accept this contribution and include HEIF support as an optional & default off feature (also not included in binary release builds), without getting into legal trouble?

  • Are the libheif developers either the holders of the patents it embodies, or licensed to use them to make an implementation under LGPLv3?
    – MadHatter
    Jul 11, 2019 at 14:04

1 Answer 1


tl; dr: no.

We have already had a question here about HEIF and free implementations thereof, the upshot of which was that the use of LGPLv3 for libheif grants a licence for any patents held or used under licence by the author. Unfortunately, it's not at all clear that the libheif authors have the rights so to use the patents embodied by HEIF, so it's not at all clear that their use by libheif users is licensed.

But the bigger problem is that your software is GPLv2, and libheif is LGPLv3. The FSF has held that those two licences are incompatible, and others agree. So all patent issues aside, unless one of you changes your licensing arrangements, the two bodies of code cannot be combined.

I note that your question introduces subtleties like enabling HEIF support to be turned off at build time, and not shipping any binaries with it turned on. Whether that would improve the patent situation I cannot say, but I suspect that enough libheif-specific changes would have to be made to your codebase to enable HEIF to be meaningfully compiled-in on request that your code would become a derivative work of libheif, thus running you squarely into the licence compatibility issue. I also suspect, though with less grounds, that shoving the whole patent issue downstream like that will not endear you to distributors, who may just throw up their hands and decide not to touch your project until it's unquestionably patent-unencumbered.

Though, as ever, IANAL/IANYL, and you should seek your own legal advice before relying on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.