All formats

HEIC libraries for C/C++

Pick libheif to write HEIC or for an LGPL license; heicdec for a single-file decoder without plugins, if the AGPL fits your project.

The HEVC decoder libde265 can be used directly only if you parse the container yourself; there’s no reason to do that. Higher-level libraries (libvips, ImageMagick) read and write HEIC through libheif.

Distribution packages often split the codecs into plugins (libheif-plugin-libde265, libheif-plugin-x265 on Debian and Ubuntu). If decoding fails with “unsupported codec”, the HEVC plugin is missing.