This is a Rust port of png2rex.
- Clone the repository:
git clone https://github.com/thebracket/png2rex_rs.git
- Enter the
png2rex_rs
directory:cd png2rex_rs
- Build with
cargo build --release
png2rex
(.exe
on Windows) is now in your target/release directory.
With the exe
file, it's as simple as: png2rex (input png) (output xp)
. For example, png2rex resources/kitty.png kitty.xp
. If you want to run it with Cargo, you can use cargo run -- resources/kitty.png kitty.xp
.
You can provide additional CLI arguments to perform some image operations en route:
--flipv
flips the image vertically.--fliph
flips the image horizontally.--resize 64 32
will resize the image to be 64 pixels wide, 32 pixels tall.
These options can be combined and can be in any order. For example:
cargo run -- --fliph .\resources\kitty.png --flipv C:\Users\herbe\Downloads\REXPaint-v1.04\images\kitty.xp --resize 64 64
Has the same effect as:
cargo run -- .\resources\kitty.png C:\Users\herbe\Downloads\REXPaint-v1.04\images\kitty.xp --resize 64 64 --fliph --flipv
Original Kitty PNG:
REX Paint result: