All formats

HEIC libraries

Nearly all open-source HEIC support goes through libheif, which parses the HEIF container and uses plugins for the codecs: libde265 to decode HEVC, x265 or kvazaar to encode. Whether a library can write HEIC depends on whether its libheif build includes an HEVC encoder; many prebuilt packages only decode, partly because of HEVC patent concerns.

Language Library Read Write Notes
C/C++ libheif yes yes the standard implementation; HEIC, AVIF, grids, depth, metadata
C/C++ heicdec yes no plain-C decoder with its own HEVC decoder, one file; AGPL
C# LibHeifSharp yes yes full libheif API for .NET; you supply the native libheif
C# Magick.NET yes no NuGet package includes libheif + libde265; HEIC is read-only
Go libheif Go binding yes yes cgo binding in the libheif repository, image.Decode support
Go gen2brain/heic yes no no cgo: WebAssembly decoder or system libheif
Python pillow-heif yes yes Pillow plugin, wheels include libheif with HEVC codecs
Python pyvips yes yes libvips binding; needs a system libvips with libheif
Ruby ruby-vips yes yes libvips binding
Rust libheif-rs yes yes safe libheif binding, image crate integration
PHP Imagick yes yes ImageMagick extension; depends on how ImageMagick was built

No maintained open-source HEIC library exists for Java: use a libheif binary through a process call, or a commercial library.

By language#