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 and tedious.
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-converter
Setup venv
.
python -m venv env_build
env_build\Scripts\activate.bat
pip install -r requirements.txt
Install redistributable
Run the application.
python main.py
Bundling 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-gcc
Close the MSYS2 terminal and launch CMD inside project's root directory.
Clone PyInstaller.
env_build\Scripts\activate
git clone -b v6.11.1 --depth 1 https://github.com/pyinstaller/pyinstaller.git misc\pyinstaller
Recompile the bootloader.
cd misc\pyinstaller\bootloader
set PATH=C:\msys64\mingw64\bin;%PATH%
python waf all --gcc
cd ..
pip install .
cd ..\..
Reload the environment to avoid the ModuleNotFoundError
error.
deactivate
env_build\Scripts\activate
Bundle:
python build.py
Install packages.
sudo apt update
sudo apt install git make curl fuse p7zip-full
Install 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-dev
Install 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-dev
Compile and setup Python 3.13
.
pyenv install 3.13
pyenv global 3.13
Clone 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-converter
Create and activate a virtual environment.
python -m venv env_build
source env_build/bin/activate
Install Python dependencies
pip install -r requirements.txt
Now, you can run it.
python main.py
Make sure GCC is installed (build-essential
).
Recompile 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.
deactivate
source env_build/bin/activate
Build:
python build.py
To 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.1
- libavif
v1.1.1
(AOMv3.11.0
and SVT-AV1-PSYv2.3.0-A
) - imagemagick
7.* Q16-HDRI
- exiftool
12.92
- libjpeg-turbo
3.0.4
- oxipng
v9.1.2
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.exe
On 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: py
launcher, pyenv-win, Scoop or Chocolatey.
Create a test environment.
python -m venv env_dev
source env_dev/bin/activate
pip install -r requirements.txt -r requirements_test.txt
python test.py
You 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-convert
python test_convert.py