Skip to content

Native go implementation of image composition for CSS spriting

Notifications You must be signed in to change notification settings

wellington/spritewell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spritewell

Circle CI

Spritewell performs image composition on a glob of source images. This is useful for creating spritesheets of images. This is a thread safe library and is optimized for multicore systems.

Documentation available at: http://godoc.org/github.com/wellington/spritewell

Currently two different types of positioning are available, Horizontal and Vertical. Padding between images is also supported.

This project does the heavily lifting of image processing for Wellington.

To use spritewell: http://godoc.org/github.com/wellington/spritewell#example-Sprite

imgs := New(&Options{
    ImageDir:  ".",
    BuildDir:  "test/build",
    GenImgDir: "test/build/img",
})

imgs.Decode("test/*.png")
of, _ := imgs.OutputPath()
fmt.Println(of)

// Calls are non-blocking, use Wait() to ensure image encoding has
// completed and results are flushed to disk.
imgs.Wait()

About

Native go implementation of image composition for CSS spriting

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages