A tool to read the header + output image resources (as png) from a VTFX file. Supports LZMA compressed resources as well as big endian formatted resources. Written in rust.
[!NOTE] Xbox 360 vtfx's usually have multiple mip levels packed into the main resource, the largest mip level will be exported.
Untested support for:
Compressed (LZMA) and non compressed images are supported. By default alpha is not exported, but can be enabled with the --export-alpha
argument.
Files detected to be for the xbox 360 (v 864.8) that are in the image formats IMAGE_FORMAT_DXT1, IMAGE_FORMAT_DXT3 or IMAGE_FORMAT_DXT5 will have their endianness converted before decoding (otherwise the output will have corrupted color). PS3 files (usually v 819.8) do not need this.
Download the latest release and run via cmd/powershell/terminal using the command line arguments listed below to specify the input files and options.
e.g. ./vtfx_reader -i foo.vtf
to process the file "foo.vtf" in the same folder
Usage: vtfx_reader.exe [OPTIONS] --input <INPUT>
Options:
-i, --input <INPUT>
Input path (process single file) or folder (processes all vtf files in folder)
-o, --output <OUTPUT>
Output folder for exported images
--export-alpha
If alpha should be included in image export
--force-dxt-endian-fix
Force apply big to little endian fix on DXT image resources (otherwise automatic)
--no-resource-export
Do not export any resources
--open
Auto open exported images
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
Download a windows build from the latest release.
Other platforms should compile with the instructions below (linux builds may be added in future)
To compile from source, install the rust tooling rustup, clone this project repo then use cargo run
to build and run the project.
texpresso is used to decode dxt data, and lzma-rs for lzma decompression.