All formats

JPEG 2000 libraries

Open-source libraries that decode and encode JPEG 2000. Most of them use OpenJPEG under the hood: Pillow, ImageMagick (Magick.NET, Imagick), libvips (govips, ruby-vips), glymur, imagecodecs and the Rust jpeg2k crate. Independent implementations are Grok (C++), CoreJ2K (C#), the JJ2000-based Java plugin and hayro-jpeg2000 (Rust).

Language Library Read Write Notes
C/C++ OpenJPEG yes yes reference software, BSD license, used by most other libraries
C/C++ Grok yes yes fast, HTJ2K, AGPL-3.0
C# Magick.NET yes yes ImageMagick with OpenJPEG built in
C# CoreJ2K yes yes pure managed C#, BSD-3-Clause
Java jai-imageio-jpeg2000 yes yes ImageIO plugin, pure Java, JJ2000 license
Go govips yes yes libvips binding, needs libvips built with OpenJPEG
Python Pillow yes yes the standard imaging library, uses OpenJPEG
Python glymur yes yes full JP2 box access, NumPy arrays, reduced resolution reads
Python imagecodecs yes yes fast encode/decode of NumPy arrays
Ruby ruby-vips yes yes libvips binding, low memory
Rust jpeg2k yes limited safe OpenJPEG wrapper, converts to the image crate
Rust hayro-jpeg2000 yes no pure Rust, memory safe, made for PDF images
PHP Imagick yes yes ImageMagick extension

Not listed: Kakadu is the fastest and most complete JPEG 2000 SDK but it’s commercial. OpenJPH (BSD-2-Clause, C++) implements only HTJ2K (Part 15).

By language#