| Crates.io | blp |
| lib.rs | blp |
| version | 0.1.37 |
| created_at | 2025-09-24 22:46:48.263392+00 |
| updated_at | 2025-11-01 09:52:25.749862+00 |
| description | Blizzard BLP image format reader/writer (Warcraft/World of Warcraft textures) |
| homepage | |
| repository | https://github.com/WarRaft/blp-rs |
| max_upload_size | |
| id | 1853888 |
| size | 395,777 |
This is a pure Rust take on the classic Warcraft III BLP texture format.
No C glue, no old-school wrappers β just clean Rust that works everywhere: Windows, macOS, Linux.
It has a tiny UI made with egui β drop in a file, and boom, you can view it.
Under the hood there's a simple Rust library, perfect when you just need BLP decoding inside your own tools.
Oh, and it's part of the WarRaft toolkit β youβll also find it used together
with JASS-Tree-sitter-Rust,
which brings syntax support, analyzers, and more tooling for Warcraft III modding.
Wanna know how BLP works? Dive into the spec:
π BLP Specification
The blp tool can be built in two configurations:
--features "cli")--features "cli ui") β the CLI plus a native GUI viewerThe UI feature always requires CLI, so ui cannot be enabled alone.
blp [PATH]
blp <COMMAND>
In CLI-only builds, [PATH] performs a sanity probe: it checks whether the file is a valid BLP.
In UI+CLI builds, [PATH] launches the native GUI viewer with that file (useful for βOpen Withβ¦β integration).
If a <COMMAND> is provided, it always takes precedence over [PATH].
to-blpConvert an image into BLP format.
blp to-blp <INPUT> [OUTPUT] [OPTIONS]
<INPUT> β input file, usually a PNG[OUTPUT] β optional output path. If not specified, the extension will be replaced with .blpOptions:
--mips <MASK...>
Explicit mipmap mask as a sequence of 0/1 values (length 1β16).
By default all mip levels are enabled.
0 disables a mip level.1 keeps a mip level enabled (mainly serving to position zeros).Example: --mips 1 0 1 1 β all levels stay enabled except the second one, which is disabled.
--mips-limit <N>
Limit the number of generated mip levels (1β16).
All levels after N are forced to false, overriding --mips if both are given.
-q, --quality <Q>
JPEG quality (1β100).
Default: 100.
to-pngConvert a BLP texture into PNG format.
blp to-png <INPUT> [OUTPUT]
<INPUT> β input file, must be BLP[OUTPUT] β optional output path. If not specified, the extension will be replaced with .pngCheck if a BLP file is valid (CLI-only):
blp MyTexture.blp
echo $? # β 0 if valid, 3 if invalid
Convert PNG to BLP with a custom mip mask:
blp to-blp input.png --mips 1 0 1 1 -q 85
# disables only the second mip level, all others remain enabled
blp to-blp input.png --mips-limit 4
# keeps only mip levels: 1 (base), 2, 3, 4
# disables levels: 5β16 (if they would exist)
# equivalent to: --mips 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
Convert BLP to PNG:
blp to-png input.blp output.png
Open BLP in GUI (UI+CLI build):
blp MyTexture.blp
All localization files are stored in assets/locales.
You are welcome to contribute a translation in your own language using whatever workflow is most convenient for you, and
I will include it in the program.
It is not required to translate every key: any missing strings will automatically fall back to the default English (
en) localization. This means you can start small and expand the translation over time without breaking anything.