Command line tools for generating large sets of variations from existing image sets.
- MacOS only:
xcode-select install
- MacOS only:
brew install libjpeg
- MacOS Mojave only:
export CFLAGS="-I $(xcrun --show-sdk-path)/usr/include"
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 generator.py
--input /path/to/input/images/and/fonts
--output /path/to/output/images
--output-depth 5
--config /path/to/config.yaml
--samples 10000
[--show]
[--skip-cache]
The input directory should contain sprites and background images in JPG or PNG format, and TTF and/or OTF fonts. The generator script scans the input directory recursively.
An image is considered a sprite, if:
- it has an alpha channel with alpha of any pixel set to anything expect 'opaque'; or
- its size is smaller than the configured 'native' size of an image
(
processor.native.size.width
andprocessor.native.size.height
).
Image generation is controlled by the generator configuration file. See an example in config/test.yaml
.