How to pull out individual sprites from grid of sprites?
I have sprites image, which contain set of sprites. i want to pull out each sprite from grid.
I know that we 开发者_C百科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
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
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).
精彩评论