29

I have a lot of sprite images that contain dozens of icons. Is there an easy way to unravel the sprites into separate image files either automatically or feeding it coordinates, widths and heights?

Abadaba
  • 1,456
  • 7
  • 20
  • 30

7 Answers7

15

This program is pretty good at decomposing sprites into individual frames

https://github.com/ForkandBeard/Alferd-Spritesheet-Unpacker

it supports all standard bitmap formats, .png, .bmp, .gif, .tiff and does everything pretty much automatically.

mickmackusa
  • 43,625
  • 12
  • 83
  • 136
BYS2
  • 5,199
  • 5
  • 24
  • 32
8

Use the slice tool in Photoshop:

  1. Use the slice select tool (note the select part of that, see screenshot).
  2. Right-click anywhere on the canvas and select Divide Slice... from the drop down menu.
  3. Enter in the height/width or sprite multiple.
  4. Once finished, go to save for web and devices...
  5. When you save, this will export all the individual cutouts to the file format of your choosing in a separate folder.

If they are of uneven size (not on a grid) you can also select them individually with the vanilla 'slice select' tool. If you have a lot of similar grids, save everything as a photoshop action and batch process them.

slice **select** tool

Indolering
  • 3,058
  • 30
  • 45
Abadaba
  • 1,456
  • 7
  • 20
  • 30
6

I encountered a similar problem after losing the source images for a sprite and built this relatively simple tool: https://github.com/fmovlex/desprite

Hope this helps.

fmovlex
  • 61
  • 1
  • 2
  • note this only works when you have an CSS file containing the width/height and background-position of the individual images, when you only have a sprite image this option won't help you – xorinzor Dec 29 '13 at 15:01
6

This one worked nicely for me to extract images from jquery ui sprites http://renderhjs.net/shoebox/

6ton
  • 4,174
  • 1
  • 22
  • 37
5

give this as try as it will split it into individual rows: http://imagesplitter.net

Adam Seabridge
  • 1,909
  • 1
  • 20
  • 27
0

There is an android application that will dynamically split a sprite map:

https://play.google.com/store/apps/details?id=com.fourqueue.android.texture

-2

Creation of png:

I use spritepad to create the png image, just drag and drop your images to create the sprite: http://spritepad.wearekiss.com/ (but as I assume you dont want this step).

CSS:

After this I import the image to spritecow and get the css for every image (double click every image to get its height-width and coordinates): http://www.spritecow.com/

You could use spritepad only but I prefer to use it only for the creation of the sprite. For css, spritecow seems easier to me. Anyway its up to you.

vaskort
  • 2,591
  • 2
  • 20
  • 29