Generate fully compatible JPEG images with up to 35% better compression ratio.
Maximize image compression with JPEG XL and AVIF. Also available: WebP, JPEG, and PNG.
Run encoders in parallel for increased throughput.
Reduce the file size of your JPEG images by 16% - 22% with Lossless JPEG Transcoding. This process is reversible.
Scale down images to resolution, percent, shortest (and longest) side, and megapixels.
Note
The recommended way of using XL Converter is through the official binary releases. The building process is time-consuming.
Install:
- Python 3.13 (check
Add python.exe to PATH) - git
Clone the repo.
git clone -b stable --depth 1 https://github.com/JacobDev1/xl-converter.git
cd xl-converterSetup venv.
python -m venv env_build
env_build\Scripts\activate.bat
pip install -r requirements.txtInstall redistributable
Run the application.
python main.pyBundling requires recompiling the bootloader to prevent Windows from deleting the EXE (due to false positives).
Install MSYS2 and launch MINGW64.
pacman -Syu
pacman -S --needed git cmake mingw-w64-x86_64-gccClose the MSYS2 terminal and launch CMD inside project's root directory.
Important
If you upgraded any package, restart the MSYS2 environment. Otherwise, building will start failing for random reasons.
Clone PyInstaller.
env_build\Scripts\activate
git clone -b v6.11.1 --depth 1 https://github.com/pyinstaller/pyinstaller.git misc\pyinstallerRecompile the bootloader.
cd misc\pyinstaller\bootloader
set PATH=C:\msys64\mingw64\bin;%PATH%
python waf all --gcc
cd ..
pip install .
cd ..\..Note
The following error may occur C:\msys64\mingw64\bin\strip.exe: unable to copy file 'runw.exe'; reason: Permission denied. You can fix it by adding C:/msys64 to Windows Defender exclusions.
Reload the environment to avoid the ModuleNotFoundError error.
env_build\Scripts\activateBundle:
python build.pyInstall packages.
sudo apt update
sudo apt install git make curl fuse p7zip-fullInstall xcb QPA dependencies.
sudo apt install '^libxcb.*-dev' libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-devInstall pyenv via Automatic installer then add it to shell
Install Python build packages.
sudo apt install wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev liblzma-devCompile and setup Python 3.13.
pyenv install 3.13
pyenv global 3.13Clone and set up the repo.
git clone -b stable --depth 1 https://github.com/JacobDev1/xl-converter.git
chmod -R +x xl-converter
cd xl-converterCreate and activate a virtual environment.
python -m venv env_build
source env_build/bin/activateInstall Python dependencies
pip install -r requirements.txtNow, you can run it.
python main.pyRecompile the bootloader:
source env_build/bin/activate
git clone -b v6.11.1 --depth 1 https://github.com/pyinstaller/pyinstaller.git misc/pyinstaller
cd misc/pyinstaller/bootloader
python waf all --gcc
cd ..
pip install .
cd ../..Reload the environment to avoid the ModuleNotFoundError error.
source env_build/bin/activateBuild:
python build.pyTo build XL Converter, you need to provide various binaries. This can be quite challenging.
Tip
Use the official builds as a reference.
Libraries:
- libjxl
v0.11.x - libavif
v1.3.x(libaomminimum:v3.12.xand SVT-AV1-PSYv3.0.2) - imagemagick
7.x Q16-HDRI - exiftool
13.x - libjpeg-turbo
3.1.x - oxipng
v9.1.x
Below you'll find references on how to arrange the binaries. You will also need to add dependencies alongside them.
./xl-converter/bin/linux/
├── avifdec
├── avifenc
├── cjpegli
├── cjxl
├── djxl
├── imagemagick
│ └── magick
├── jpegtran
├── jxlinfo
└── oxipng./xl-converter/bin/win/
├── exiftool
│ ├── exiftool.exe
│ └── exiftool_files
├── imagemagick
│ └── magick.exe
├── jpegtran
│ └── jpegtran.exe
├── libavif
│ ├── avifdec.exe
│ └── avifenc.exe
├── libjxl
│ ├── cjpegli.exe
│ ├── cjxl.exe
│ ├── djxl.exe
│ └── jxlinfo.exe
└── oxipng
└── oxipng.exeOn Windows, I recommend using MSYS2 MINGW64 for building.
Note
When building libjpeg-turbo, embed this manifest into jpegtran.exe with mt.exe from Visual Studio. This enables a UTF-8 support in arguments.
Tip
Use ldd in MSYS2 to check which DLLs need bundling alongside the executables.
Tip
To manage multiple Python versions on Windows, you can use: the py launcher or pyenv-win.
Create a test environment.
python -m venv env_dev
source env_dev/bin/activate
pip install -r requirements.txt -r requirements_test.txtpython test.pyYou can control which tests to run. Run python test.py --help to learn more.
test_convert.py is a separate test suite focusing on validating program's output.
sudo apt install xvfb
make test-convertpython test_convert.pyBefore contributing to issues or sending pull requests, please review CONTRIBUTING.md.
