1
votes

I am trying to decompose this sprite into separate image files. The metadata for the sprite is here. I opened the project in Unity but couldn't find out how to decompose the sprites into separate files.

Since there is a metadata file that has the information for sprite position, width and height, no auto-detection is needed. All I need is a program that's gonna read the metadata file, find the sprite position, width and height data and extract the sprites from the image file.

1

1 Answers

3
votes

Unity3D has shipped this function with its SpriteEditor:

Automatic Slicing

Isolating the sprite rectangles manually works well but in many cases, Unity can save you work by detecting the graphic elements and extracting them for you automatically. If you click on the Slice menu in the control bar, you will see this panel:

enter image description here

Below include some other(programmatic) solutions as well: