Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/salieri/tartarus-image-generation-tools
Command line tools for generating large sets of variations from existing image sets.
https://github.com/salieri/tartarus-image-generation-tools
Last synced: 6 days ago
JSON representation
Command line tools for generating large sets of variations from existing image sets.
- Host: GitHub
- URL: https://github.com/salieri/tartarus-image-generation-tools
- Owner: salieri
- License: mit
- Created: 2019-07-28T16:43:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-22T04:32:36.000Z (almost 2 years ago)
- Last Synced: 2024-04-13T05:00:08.661Z (7 months ago)
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Tartarus Image Generation Tools
Command line tools for generating large sets of variations from existing image sets.
## Installation
1. MacOS only: `xcode-select install`
1. MacOS only: `brew install libjpeg`
1. MacOS Mojave only: `export CFLAGS="-I $(xcrun --show-sdk-path)/usr/include"`
1. `python3 -m venv venv`
1. `source venv/bin/activate`
1. `pip install -r requirements.txt`## Generating a Sample Library
```bash
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`](config/test.yaml).