kleisauke/net-vips

.NET binding for libvips.

What it solves

Traditional image processing often loads entire images into memory, which is slow and memory-hungry. NetVips provides a .NET binding to libvips, a library that processes images in small sections, streaming them through a pipeline. This makes operations like resizing and sharpening much faster and lighter on memory.

How it works

Programs define a pipeline of operations on a source image. Instead of executing each operation immediately, the whole pipeline runs at once when connected to a destination. libvips streams the image in parallel, processing sections at a time, so it doesn't need the full image in memory. NetVips uses the native libvips library, and the binding passes the vips test suite with no leaks on Windows, macOS, and Linux.

Who it’s for

.NET developers who need to perform image processing (like resizing, sharpening, conversions) in their applications and want high performance and low memory usage. It supports .NET Framework 4.6.2+ and .NET 6.0+. Requires the libvips shared library (version 8.2+), but separate NuGet packages supply precompiled binaries for many platforms.

Highlights

  • Around 26x faster than Magick.NET and 4x faster than ImageSharp on a benchmark (load large image, shrink 10%, sharpen, save).
  • Supports multiple platforms via NuGet native packages, covering Windows, Linux (glibc and musl), and macOS, with ARM64 and x86 variants.
  • Formats supported include JPEG, PNG, Ultra HDR, WebP, AVIF, TIFF, GIF, and SVG (input).
  • Provides a simple C# API, as shown with an example embedding, multiplying bands, and convolving.

Related

  • Project
  • Project
  • Project
  • Project