Small CLI utilities for working with League of Legends TEX textures, powered by league-toolkit.
- Inspect TEX: print format, dimensions, mipmaps, and resource type
- Encode: convert standard images (PNG/JPG/TGA/BMP/…) into
.tex - Decode: convert
.texback to common image formats (driven by output file extension) - Mipmaps: optional generation with selectable filters
- Windows Thumbnail Provider: show
.texfile previews directly in Windows Explorer
On Windows (recommended):
PowerShell (user scope):
iwr -useb https://raw.githubusercontent.com/LeagueToolkit/ltk-tex-utils/main/scripts/install-windows.ps1 | iexThis downloads the latest release, installs it to %LOCALAPPDATA%\LeagueToolkit\ltk-tex-utils, adds a stable bin shim to your user PATH, and makes ltk-tex-utils available in new terminals.
On Windows, you can install a thumbnail provider that shows previews of .tex files directly in Windows Explorer.
Installation (requires administrator privileges):
# Run PowerShell as Administrator, then:
iwr -useb https://raw.githubusercontent.com/LeagueToolkit/ltk-tex-utils/main/scripts/install-thumbnail-handler.ps1 | iexThis will:
- Download the
ltk-tex-thumb-handler.dllfrom the latest release - Install it to
%ProgramFiles%\LeagueToolkit\ltk-tex-thumb-handler - Register the COM DLL with Windows Explorer
Note: You may need to restart Windows Explorer or your computer for thumbnails to appear.
Uninstallation:
To uninstall the thumbnail handler, run PowerShell as Administrator and execute:
regsvr32.exe /u "%ProgramFiles%\LeagueToolkit\ltk-tex-thumb-handler\ltk_tex_thumb_handler.dll"Top-level help:
ltk-tex-utils --helpSubcommands:
Prints basic metadata about a TEX file.
ltk-tex-utils info -i path/to/texture.texExample output:
info: path/to/texture.tex
format : Bc3
dimensions : 1024x1024
mipmaps : 10 (has_mipmaps: true)
resource : Texture2D
Encode an image into .tex.
ltk-tex-utils encode \
path/to/input.png \
-f <bc1|bc3|bgra8> \
-m <true|false> \
--mipmap-filter <nearest|triangle|catmullrom|lanczos3>Notes:
-m/--generate-mipmapsdefaults totrue. Pass-m falseto disable mipmap generation.- The input image is read via the
imagecrate and supports common formats like PNG, JPEG, BMP, TIFF, TGA, etc. - If
-o/--outputis not provided, output is written next to the input with the same name and a.texextension.
Examples:
# BC3 with default mipmaps (triangle)
ltk-tex-utils encode albedo.png -f bc3
# Disable mipmaps
ltk-tex-utils encode icon.png -f bgra8 -m false
# BC1 with a different mipmap filter
ltk-tex-utils encode mask.png -f bc1 --mipmap-filter lanczos3Decode a .tex file into a standard image.
ltk-tex-utils decode path/to/input.texNotes:
- The output image format is inferred from the file extension (e.g.,
.png,.jpg,.tiff). - Currently decodes the top-level mip (mip 0).
- If
-o/--outputis not provided, output is written next to the input with the same name and a.pngextension.
- Texture formats:
bc1,bc3,bgra8
(ETC1/ETC2 are not supported.) - Mipmap filters:
nearest,triangle(default),catmullrom,lanczos3
The tool emits human-friendly logs. Informational, debug, and trace logs go to stdout; warnings and errors go to stderr.
Run from source:
cargo run -p ltk-tex-utils -- <subcommand> [options]Examples:
cargo run -p ltk-tex-utils -- info -i samples/texture.tex
cargo run -p ltk-tex-utils -- encode samples/albedo.png -f bc3
cargo run -p ltk-tex-utils -- decode samples/texture.texBuilt on top of league-toolkit's texture APIs.