views:

31

answers:

2

Hi

I have sprites image, which contain set of sprites. i want to pull out each sprite from grid. alt text

I know that we have to split them through their pixels positions. But i think its not an easy task and time consuming. so is there other way or tool to get thier pixel position to retrieve images ?

Thank you ,

Srinivas

A: 

I would suggest ImageMagick put I'm not sure it has an implementation that runs on Android.

http://www.imagemagick.org/Usage/crop/#crop

e.g.

convert spriteset.png -crop 20x20+10+10 cropped.png
oberhamsi
Ok thank u i will try using this .
Srinivas
A: 

Tell your artist to mono-space the sprites. And having flipped assets is useless since you can flip the texture yourself during load time (or at runtime).

With your current setup, you'll will need the pixel coordinate of the center of the sprite sheet, the height of each row of sprites, and the width of the sprites in each row (since your sprites appear to have varying widths).

vdeych