Extension:SpriteSheet

The SpriteSheet extension allows uploaded images to be divided into sprite sheets or custom slices to be displayed without having to use an external image editor. The resulting sprites and slices are dynamically generated using CSS.


 * Project Homepage: Documentation at Github
 * Mediawiki Extension Page: Extension:SpriteSheet
 * Source Code: Source Code at Github
 * Bugs: Issue Tracker at Github
 * Licensing: SpriteSheet is released under The GNU Lesser General Public License, version 3.0.

#sprite - Parser Tag
The #sprite tag format accepts X and Y coordinate positions to select a section of the image from a traditional column and row format.

Basic Syntax:

With optional thumbnail resize:

Example
To display the sprite located at column 4, row 2:



#ifsprite - Parser Tag
The #ifsprite tag is used to display a named sprite if it exists. If the named sprite does not actually exist yet it will instead return the given wiki text.

Basic Syntax:

#slice - Parser Tag
The #slice tag takes X and Y percentage positioning along with width and height percentaging sizing to select a section of the image. This works regardless if the image is manually resized or done through thumbnail sizing. If pixel perfect accurancy is required the unit of measurement can be manually specified to use pixels for each argument; "10px". However, using pixels does not guarantee the slice will always contain the same section if the image is edited or resized.

Basic Syntax:

With optional thumbnail resize:

#ifslice - Parser Tag
The #ifslice tag is used to display a named slice if it exists. If the named slice does not actually exist yet it will instead return the given wiki text.

Basic Syntax:

Naming Sprites/Slices


After a sprite or slice has been selected a pop up will open under the tag preview. This allows a custom name to be set for the selection that can be recalled later. It uses the same #sprite and #slice parser tags with only the name as the first argument after the file name. Adding the optional thumb width is still supported.