LibHeif.Native.Runtime
1.20.2
dotnet add package LibHeif.Native.Runtime --version 1.20.2
NuGet\Install-Package LibHeif.Native.Runtime -Version 1.20.2
<PackageReference Include="LibHeif.Native.Runtime" Version="1.20.2"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="LibHeif.Native.Runtime" Version="1.20.2" />
<PackageReference Include="LibHeif.Native.Runtime"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add LibHeif.Native.Runtime --version 1.20.2
#r "nuget: LibHeif.Native.Runtime, 1.20.2"
#:package LibHeif.Native.Runtime@1.20.2
#addin nuget:?package=LibHeif.Native.Runtime&version=1.20.2
#tool nuget:?package=LibHeif.Native.Runtime&version=1.20.2
LibHeif.Native.Runtime
Native libheif binaries for .NET projects, packaged for NuGet.
Targets:
- Windows x64
- Linux x64 (glibc ≥ 2.17, i.e. Ubuntu 18.04+)
Built from strukturag/libheif using the
release-noplugins CMake preset — a self-contained shared library with HEVC
(libde265) and AV1 (dav1d/libaom) codecs compiled in. No separate codec plugin
files are required at runtime.
Usage
This package is intended to be used alongside LibHeifSharp, which provides the .NET P/Invoke bindings:
<PackageReference Include="LibHeifSharp" Version="3.*" />
<PackageReference Include="LibHeif.Native.Runtime" Version="1.20.2" />
LibHeifSharp uses [DllImport("libheif")]. The .NET runtime resolves this to:
libheif.dllon Windowslibheif.soon Linux
This package places the correct binary in runtimes/{rid}/native/ so the .NET
SDK copies it next to your output assembly automatically.
AnyCPU projects
If your project doesn't set a RuntimeIdentifier, the included MSBuild
.targets file (auto-imported via NuGet) copies the correct binary to your
output directory based on the build machine's OS and architecture.
For RID-specific builds (dotnet publish -r win-x64 etc.), the standard NuGet
runtimes/ convention handles everything without the .targets file.
LGPL Notice
libheif is licensed under the GNU Lesser General Public License v3.0.
If your application dynamically links libheif (which is what this package
does — it ships a shared library), the LGPL allows use in proprietary software
provided you allow users to replace the libheif shared library. Shipping it
as a separate .dll/.so (as this package does) satisfies this requirement.
The codec libraries (libde265, dav1d) are also LGPL. libaom (AV1 encoder/decoder) is BSD-2-Clause.
Package structure
runtimes/
win-x64/native/libheif.dll
linux-x64/native/libheif.so
build/
LibHeif.Native.Runtime.targets (AnyCPU copy helper)
buildTransitive/
LibHeif.Native.Runtime.targets
Building from source / CI
See .github/workflows/main.yml. The workflow:
- Builds libheif on
windows-latestandubuntu-22.04(x64). - Downloads both artifacts and packs a single
.nupkg. - Publishes to NuGet.org when a
v*tag is pushed.
To bump the libheif version, update LIBHEIF_VERSION in the workflow and
<Version> in src/LibHeif.Native.Runtime.csproj.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.20.2 | 161 | 3/8/2026 |