flow-texpack: A program that will allow you to generate texture atlas.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Andreas Widen 8d5fc9ecdd
Initial commit.
Signed-off-by: Andreas Widen <aw@luflow.net>
2026-07-27 17:44:48 +02:00
src Initial commit. 2026-07-27 17:44:48 +02:00
test_data Initial commit. 2026-07-27 17:44:48 +02:00
tests Initial commit. 2026-07-27 17:44:48 +02:00
.gitignore Initial commit. 2026-07-27 17:44:48 +02:00
AUTHORS Initial commit. 2026-07-27 17:44:48 +02:00
Cargo.lock Initial commit. 2026-07-27 17:44:48 +02:00
Cargo.toml Initial commit. 2026-07-27 17:44:48 +02:00
cliff.toml Initial commit. 2026-07-27 17:44:48 +02:00
LICENSE Initial commit. 2026-07-27 17:44:48 +02:00
README.md Initial commit. 2026-07-27 17:44:48 +02:00

flow-texpack

flow-texpack is a program that will allow you to generate texture atlas from input images (BMP, HDR, JPG, PNG, TGA, TIFF, WEBP). The application generates both texture atlas and descriptions file that can be read by a game.

Installation

Install Rust from your package manager or by downloading from here: https://rust-lang.org/.

Build

Build using release mode and install locally (on GNU/Linux this is ~/.cargo/bin):

cargo install --locked --path .

Usage

Show available options:

flow-texpack -h

or

flow-texpack --help

Examples

Generate from input data/characters and data/tiles, write output to out/atlas and enable the options: premultiply pixels by their alpha channel, trim excess transparency off the textures, remove duplicate textures from the atlas, enable rotation of textures 90 degrees clockwise, pad each texture by 2 pixels and finally enable verbose output mode.

flow-texpack -i data/characters data/tiles -o out/atlas -m -t -u -r -p 2 -v

Enable load filter so that only TGA images are included in the texture atlas:

flow-texpack -i data/tiles -o out/atlas --load-filter tga -v

Enable rect heuristic AreaFit:

flow-texpack -i data/tiles -o out/atlas --rect-heuristic area-fit -v

Enable output atlas size of 2048x2048:

flow-texpack -i data/tiles -o out/atlas --atlas-size pot2048 -v

Read input files/directories from input.txt but exclude all in exclude.txt:

flow-texpack --input-file input.txt --exlude-file exclude.txt -o out/atlas -v

Adjust atlas size automatically so that texture will fit:

flow-texpack -i data/characters -o out/atlas --adjust-size -v

Adjust texture size so that it will fit given atlas size:

flow-texpack -i data/characters -o out/atlas --adjust-fit -v

LICENSE

See the file 'LICENSE' for license information.