Skip to content

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

License

Notifications You must be signed in to change notification settings

LeeWannacott/gontage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Help:

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