Rust-VTF is a cross-platform tool for converting between image formats, including support for Valve's VTF format.
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:
sh
cargo install rvtf
To use Rust-VTF from the command line, run the following command:
```plain Usage: rvtf [OPTIONS]
Arguments: Input file / directory
Options:
-f, --format
Here are some examples on how you would use the CLI;
```sh
rvtf input.jpg output.vtf
rvtf input.png output.jpg -f jpg ```
To use Rust-VTF as a library, add the following line to your Cargo.toml:
toml
[dependencies]
rvtf = "1.0.0"
Then, in your code, you can use Rust-VTF as follows:
```rust use rvtf::convert;
// Convert a single file, it will automatically detect the format convert("input.jpg", "output.vtf", None).unwrap();
// Convert all files in a directory and its subdirectories convert("inputdirectory", "outputdirectory", Some("png")).unwrap(); ```
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.
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.