https://github.com/thebracket/png2rex_rs
Utility for converting PNG files to REX Paint .xp files.
https://github.com/thebracket/png2rex_rs
Last synced: 11 months ago
JSON representation
Utility for converting PNG files to REX Paint .xp files.
- Host: GitHub
- URL: https://github.com/thebracket/png2rex_rs
- Owner: thebracket
- License: mit
- Created: 2021-02-27T15:21:26.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-27T17:02:27.000Z (over 5 years ago)
- Last Synced: 2025-04-30T12:31:46.327Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 21.5 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# png2rex_rs - a utility for converting PNG files into REXPaint files
This is a Rust port of [png2rex](https://github.com/thebracket/png2rex).
## Building png2rex
1. Clone the repository: `git clone https://github.com/thebracket/png2rex_rs.git`
2. Enter the `png2rex_rs` directory: `cd png2rex_rs`
3. Build with `cargo build --release`
4. `png2rex` (`.exe` on Windows) is now in your target/release directory.
## Using png2rex
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`.
### Optional extras
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
```
## Results
**Original Kitty PNG**:

**REX Paint result**:
