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#
- ICO libraries for C/C++ Open-source C/C++ library to read and write Windows ICO icons and CUR cursors: Magick++ (ImageMagick), with code examples.
- ICO libraries for C# Open-source .NET libraries to read and write Windows ICO icons and CUR cursors: Magick.NET, ImageSharp and System.Drawing.Icon, with code examples.
- ICO libraries for Java Open-source Java library to read and write Windows ICO icons and CUR cursors: the TwelveMonkeys ImageIO BMP plugin, with code examples.
- ICO libraries for Go Open-source Go library to read and write Windows ICO icons and CUR cursors: go-ico, with code examples for decoding, encoding and hotspots.
- ICO libraries for Python Open-source Python library to read and write Windows ICO icons and CUR cursors: Pillow, with code examples for favicons and multi-size icons.
- ICO libraries for Ruby Open-source Ruby library to read and write Windows ICO icons and CUR cursors: MiniMagick (ImageMagick), with code examples.
- ICO libraries for Rust Open-source Rust crates to read and write Windows ICO icons and CUR cursors: ico and image, with comparison and code examples.
- ICO libraries for PHP Open-source PHP library to read and write Windows ICO icons and CUR cursors: the Imagick extension (ImageMagick), with code examples.