Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

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

2 Answers 2

up vote 5 down vote accepted

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

share|improve this answer
    
Excellent! Sprite Vortex was the app I was looking for. –  Raymond Holmboe Sep 11 '12 at 16:14
add comment

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:

share|improve this answer
    
I do not have the mappings unfortunately –  Raymond Holmboe Sep 11 '12 at 15:42
    
@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. –  Hackworth Sep 11 '12 at 15:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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