2017 © Pedro Peláez
 

library spritesheet-generator

Generates CSS, SCSS and a sprite sheet image from a directory of PNGs, using the power of Bash and ImageMagick.

image

farbelous/spritesheet-generator

Generates CSS, SCSS and a sprite sheet image from a directory of PNGs, using the power of Bash and ImageMagick.

  • Saturday, April 21, 2018
  • by itsjavi
  • Repository
  • 2 Watchers
  • 1 Stars
  • 0 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

spritesheet-generator

Generates an sprite sheet image, CSS and SCSS from a directory of PNGs, using the power of bash and ImageMagick, (*1)

Usage example: ./generate.sh -ts -n icons, (*2)

Requirements

  • Operative System with bash support
  • ImageMagick installed and available via bash (for commands like identify, mogrify and montage)
  • A folder with PNG files

Features

  • Generates CSS and SCSS sprite sheet styles
  • Generates a HTML sprite sheet preview file
  • Can trim empty space of each image before joining and also the final one
  • Can sort sprites by dimensions
  • Works either with sprites having equal or different dimensions

Options

  • -h Show help
  • -t Trims empty surrounding space of every image before joining them, and also the final one
  • -s Sorts the images in the sprite sheet by dimensions from smallest to biggest
  • -c <columns> Maximum number of sprites in every row
  • -n <name> Relative child folder name, also used as base name for generated files

The Versions

21/04 2018

dev-master

9999999-dev https://github.com/farbelous/spritesheet-generator/

Generates CSS, SCSS and a sprite sheet image from a directory of PNGs, using the power of Bash and ImageMagick.

  Sources   Download

MIT