Possible Duplicate:
How to decompose sprite sheet

I'm doing a port of an existing game and the designer no longer has all of the original art; he only has the resulting texture atlases he used when developing for iPad. The tool I'm using won't support these files so I need to break them back out into separate PNG files.

I'm hoping someone knows of a software tool that does this. PC software would be preferred in this case, but Mac would suffice.


To add some clarification; these texture atlases are in a simple gridded layout with even distribution and not packed. No need to tie back to descriptor files; I just need a simple animation splitter type of tool where I can tell it the size of a frame, point it to the image and from that get a set of separate images.

  • \$\begingroup\$ r2d2rigo, it does appear he was asking the same question as me, but his question did not turn up in the search results due to using different terms for the same thing; texture atlas vs sprite sheet. \$\endgroup\$ – bigtunacan Dec 13 '12 at 14:24
  • \$\begingroup\$ no problem, that's why flagging exists; not because your question is wrong or bad, just to notify you that the same thing was asked before and perhaps one of their answers suits you. \$\endgroup\$ – r2d2rigo Dec 13 '12 at 14:30

Use ImageMagick.

Sample command-line parameters to split an atlas of any size named beholder.png with an 84x84 grid:

convert beholder.png +gravity -crop 84x84 +repage +adjoin test_%d.png
| improve this answer | |

Manually/Automatically splitting the atlas without sprite info is hard to get right. The atlases you have should come along with a Data file that has all the sprites locations, sizes and offsets. You might try looking for it and decoding.

In the best case scenario - you need to rig your game to read the atlases and info from the original atlases format, without inbetween converting. Because atlases are much more efficient than single images (maybe you just convert the fileformat from your_format -> PNG, but keep the sprite data).

EDIT: After seeing you refer to evenly spaced sprites, I would suggest just writing a custom tool. 30-45min of work and you are done.

| improve this answer | |
  • \$\begingroup\$ The texture atlases I've been provided are not optimized so the images are all laid out in an evenly spaced grid, so splitting them out won't need to link back to the descriptor files; so this is a fairly simple scenario. I remember stumbling across a tool that did exactly what I need right now some time back; of course I didn't have a use for it at the time... and now I've googled and come up empty handed :( \$\endgroup\$ – bigtunacan Dec 13 '12 at 5:19
  • \$\begingroup\$ That's an important addition, you should put that into the question :) \$\endgroup\$ – Kromster Dec 13 '12 at 5:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.