This patch enables UTF-8 support in cjxl, djxl, cjpegli, djpegli, jxlinfo on Windows.
cd libjxl/
wget https://raw.githubusercontent.com/JacobDev1/libjxl-utf8/main/utf8_0.10.2.patch
git apply utf8_0.10.2.patchCompatible with libjxl 0.10.2
Install MSYS2 and launch MSYS2 MINGW64
Synchronize packages
pacman -SyuMSYS2 will close, open it again, and install the packages
pacman -S --needed git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-gtest mingw-w64-x86_64-giflib mingw-w64-x86_64-libpng mingw-w64-x86_64-libjpeg-turboClone and enter the repo
git clone --depth 1 -b v0.10.2 https://github.com/libjxl/libjxl
cd libjxl/Download and apply the patch
wget https://raw.githubusercontent.com/JacobDev1/libjxl-utf8/main/utf8_0.10.2.patch
git apply utf8_0.10.2.patchDownload dependencies
./deps.shGenerate a makefile
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_FORCE_SYSTEM_GTEST=ON ..Build
cmake --build .You will find the tools in libjxl/build/tools/.
To run them outside of MSYS2, you need to include the necessary DLLs in the same folder.
- Make a new folder anywhere, let's call it
libjxl-tools - Copy the EXEs from
C:/msys64/home/user/libjxl/build/tools/tolibjxl-tools - Copy the DLLs mentioned below from
C:/msys64/mingw64/bin/intolibjxl-tools
- zlib1.dll
- libwinpthread-1.dll
- libstdc++-6.dll
- libpng16-16.dll
- libjpeg-8.dll
- libgif-7.dll
- libgcc_s_seh-1.dll
- libbrotlienc.dll
- libbrotlidec.dll
- libbrotlicommon.dll
- Click on
cjxl.exeinlibjxl-tools. If you get DLL errors, also include those DLLs.
Import cjxl.exe into a dependency walker. Any DLL not linked to system32 needs to be copied over from C:/msys64/mingw64/bin/.