All formats

ICO libraries

Open-source libraries that decode and encode ICO files. Few languages have a dedicated ICO library; most use a general image library (Pillow, ImageMagick, the Rust image crate). Check 2 things when you pick one: can it read every entry or only the largest, and can it write a multi-size icon.

Language Library Read Write Notes
C/C++ Magick++ (ImageMagick) yes yes all entries, BMP and PNG, CUR read; multi-size with icon:auto-resize
C# Magick.NET yes yes ImageMagick for .NET, all entries, CUR read
C# ImageSharp yes yes pure managed code, ICO and CUR since 4.0, per-entry BMP/PNG choice
C# System.Drawing.Icon yes no Windows only; pick a size, extract icons from EXE files
Java TwelveMonkeys ImageIO yes yes ImageIO plugin; ICO read/write, CUR read with hotspot
Go go-ico yes yes ICO and CUR, all entries, registers with image
Python Pillow yes yes writes multi-size icons from one image; CUR read only
Ruby MiniMagick yes yes wraps the ImageMagick command line
Rust ico yes yes dedicated ICO/CUR crate, every entry, hotspots
Rust image yes yes decodes the largest entry; encoder writes several frames
PHP Imagick yes yes ImageMagick extension

By language#