9
\$\begingroup\$

I have a lot of spritesheets that are poorly formatted that I want to decompose, or split out into many small images, one for each sprite. If I can do that, I can use my custom texture packer tool to build my game assets with.

My development tools are XNA and C# targetting Windows. How can I decompose the images?

\$\endgroup\$
  • 1
    \$\begingroup\$ you could load them up in paint and do as you wish : D \$\endgroup\$ – Shane.C Sep 11 '12 at 14:56
  • \$\begingroup\$ Texture2D.GetData/SetData and some relatively simple maths. Depends on how the data is formatted. Follow it up with SaveAsPng. \$\endgroup\$ – Andrew Russell Sep 11 '12 at 15:26
  • \$\begingroup\$ Paint = pain :) \$\endgroup\$ – Raymond Holmboe Sep 11 '12 at 15:39
  • \$\begingroup\$ I'm not to sure how to do the simple math though \$\endgroup\$ – Raymond Holmboe Sep 11 '12 at 15:40
6
\$\begingroup\$

Try Sprite Decomposer or Sprite Vortex, I believe both of them have automatic sprite cutting based on alpha.

\$\endgroup\$
  • 1
    \$\begingroup\$ Excellent! Sprite Vortex was the app I was looking for. \$\endgroup\$ – Raymond Holmboe Sep 11 '12 at 16:14
  • 1
    \$\begingroup\$ Sprite Decomposer IS NOT WORKING ON MAC OS 10.9 \$\endgroup\$ – GameLoading Jul 26 '14 at 4:59
  • \$\begingroup\$ I forked Sprite Decomposer and ported it to QT5 for modern OS X support. Please check out the github repo with pre-built binaries available at its sourceforge home \$\endgroup\$ – eriknelson Jan 1 '15 at 21:03
0
\$\begingroup\$

Two methods come to mind, depending on the number of fragments that you want to create:

Either Paint, as noted in the comments. Easily faster than coding something up if you have a small-ish number of spritesheets and/or if you are missing most of the mappings.

Or you could write a little XNA program that goes something like this:

\$\endgroup\$
  • \$\begingroup\$ I do not have the mappings unfortunately \$\endgroup\$ – Raymond Holmboe Sep 11 '12 at 15:42
  • \$\begingroup\$ @RaymondHolmboe Then you need to provide more detail. Is there any way that a program could distinguish one texture map from another automatically, or do all sub-textures have the same size, or whatever? If you have more info, please add it to your question, otherwise I don't see how you can solve it other than with Paint. \$\endgroup\$ – Hackworth Sep 11 '12 at 15:55
0
\$\begingroup\$

You need to ether go to Adobe fireworks or Paint

But if your doing paint your also going to need paint.net! becuase if you use paint its going to have a background so once you open that sprite in paint.net you can take the background away its really simple but if your worryed about textures like in games you have to make your own.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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