JPEG XL libraries for C/C++
- libjxl is the reference implementation and the only complete JPEG XL encoder. It supports every feature: lossy and lossless coding, animation, HDR, progressive decoding, metadata boxes and lossless JPEG recompression. The API is streaming and event-based: more code than a one-call loader, but it lets you read only the header or decode as data arrives.
- jxldec is a decoder in plain C with no dependencies (libjxl is C++ and needs highway, brotli and skcms). One
.c+.hfile, single-threaded, verified against libjxl. It doesn’t encode or reconstruct recompressed JPEGs. MIT license. SumatraPDF uses it.
Higher-level C libraries use libjxl internally: libvips (vips_jxlload, vips_jxlsave) and ImageMagick (MagickWand, Magick++) read and write JXL when built with libjxl. Pick one of them if you already use it for other formats; pick libjxl when you need full control or lossless JPEG transcoding.
- jxldec jxldec is a decode-only JPEG XL library in plain C with no dependencies, verified against libjxl. How to add it, decode JXL to RGBA, read image info.
- libjxl libjxl is the JPEG XL reference library for C and C++. How to install it, decode and encode JXL files, set quality and effort, and recompress JPEG losslessly.