LeeWannacott / gontage

Create multiple spritesheets; up to ~48x faster than ImageMagicks montage command.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Usage:

gontage -h

image

Example:

image

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)

image

Single folder -f:

  • gontage was ~3.5x faster in this instance tested on a 12 core AMD 5900x image

  • ~2.5x faster on a 2 core 4 thread i5-4210U Skylake CPU. image

At around the same level of compression:

image vs. image

Image comparison:

Reference images 33 - 40 :

Gontage: image

Montage 7: image

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).

About

Create multiple spritesheets; up to ~48x faster than ImageMagicks montage command.

License:GNU General Public License v3.0


Languages

Language:Go 100.0%