Skip to content
/ rvtf Public

Rust-VTF is a command-line tool for cross-platform image format conversion, with support for Valve's VTF format.

Notifications You must be signed in to change notification settings

Daxanius/rvtf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

cargo install rvtf

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
rvtf input.jpg output.vtf

# Convert a PNG to a JPEG
rvtf input.png output.jpg -f jpg

Library

To use Rust-VTF as a library, add the following line to your Cargo.toml:

[dependencies]
rvtf = "1.0.0"

Then, in your code, you can use Rust-VTF as follows:

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("input_directory", "output_directory", Some("png")).unwrap();

License

Licensed under either of

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.

About

Rust-VTF is a command-line tool for cross-platform image format conversion, with support for Valve's VTF format.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages