https://github.com/kyle-wannacott/gontage
Create multiple spritesheets; up to ~48x faster than ImageMagicks montage command.
https://github.com/kyle-wannacott/gontage
blazingly-fast cli command-line-tool composite-images game-development gamedev go image imagemagick montage mosaic sprites spritesheet
Last synced: 3 months ago
JSON representation
Create multiple spritesheets; up to ~48x faster than ImageMagicks montage command.
- Host: GitHub
- URL: https://github.com/kyle-wannacott/gontage
- Owner: kyle-wannacott
- License: gpl-3.0
- Created: 2023-08-26T14:06:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-12T11:17:00.000Z (7 months ago)
- Last Synced: 2025-02-23T03:32:34.699Z (3 months ago)
- Topics: blazingly-fast, cli, command-line-tool, composite-images, game-development, gamedev, go, image, imagemagick, montage, mosaic, sprites, spritesheet
- Language: Go
- Homepage:
- Size: 48 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gontage
Create spritesheets from multiple folders of sprites/images up to ~48x+ faster than ImageMagicks `montage` command.
## Install
`go install github.com/LeeWannacott/gontage@latest`## Features
* Images to Spritesheet: flags(-f or -mf)
* Images to Resized images: flags (-f -ss -sr)
* Spritesheet cut into images: flags (-f -x)## Help:
`gontage -h`
## Example:
## Benchmarking:
### Multiple folders containing sprites -mf:
* gontage was up to ~48x faster than montage at creating multiple spritesheets (tested on a 12 core [AMD 5900x](https://www.amd.com/en/product/10461))

### Single folder -f:
* gontage was ~3.5x faster in this instance tested on a 12 core [AMD 5900x](https://www.amd.com/en/product/10461)
* ~2.5x faster on a 2 core 4 thread [i5-4210U](https://www.intel.com/content/www/us/en/products/sku/81016/intel-core-i54210u-processor-3m-cache-up-to-2-70-ghz/specifications.html) Skylake CPU.
At around the same level of compression:

vs.
## Image comparison:
Reference images [33](https://github.com/LeeWannacott/gontage/blob/main/test_sprites/frame0033.png) - [40](https://github.com/LeeWannacott/gontage/blob/main/test_sprites/frame0033.png) :
[Gontage:](https://github.com/LeeWannacott/gontage/blob/main/test_sprites_f187_v24_gontage.png)
[Montage 7:](https://github.com/LeeWannacott/gontage/blob/main/test_sprites_f187_v24_montage_7.png)
## Other Info:
* Using an appImage for ImageMagick adds around 0.8seconds to startup time when running montage...
* Building an equivalent in NodeJS took around ~700ms (800ms with Bun) for one folder 7x slower than Gontage (~90ms) and 2x slower than Montage (~350ms).