Rust-VTF
Rust-VTF is a cross-platform tool for converting between image formats, including support for Valve's VTF format.
Installation
To install Rust-VTF, you'll need to have Rust installed on your system. Once Rust is installed, you can install Rust-VTF with the following command:
Usage
Command Line
To use Rust-VTF from the command line, run the following command:
Usage: rvtf [OPTIONS] <INPUT> <OUTPUT>
Arguments:
<INPUT> Input file / directory
<OUTPUT> Output file / directory
Options:
-f, --format <FORMAT> File format (jpg, vtf, etc.)
-h, --help Print help
-V, --version Print version
Here are some examples on how you would use the CLI;
# Convert a JPEG to a VTF
# Convert a PNG to a JPEG
Library
To use Rust-VTF as a library, add the following line to your Cargo.toml:
[]
= "1.0.0"
Then, in your code, you can use Rust-VTF as follows:
use convert;
// Convert a single file, it will automatically detect the format
convert.unwrap;
// Convert all files in a directory and its subdirectories
convert.unwrap;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.