Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.21 KB

README.md

File metadata and controls

42 lines (28 loc) · 1.21 KB

Tartarus Image Generation Tools

Command line tools for generating large sets of variations from existing image sets.

Installation

  1. MacOS only: xcode-select install
  2. MacOS only: brew install libjpeg
  3. MacOS Mojave only: export CFLAGS="-I $(xcrun --show-sdk-path)/usr/include"
  4. python3 -m venv venv
  5. source venv/bin/activate
  6. pip install -r requirements.txt

Generating a Sample Library

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:

  1. it has an alpha channel with alpha of any pixel set to anything expect 'opaque'; or
  2. its size is smaller than the configured 'native' size of an image (processor.native.size.width and processor.native.size.height).

Generator Configuration File

Image generation is controlled by the generator configuration file. See an example in config/test.yaml.