Skip to content

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

License

Notifications You must be signed in to change notification settings

salieri/tartarus-image-generation-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages