I got some image resources from a iOS game (a png file & a plist file). The resources are packed by texture packer. I'd like to restore the .png & .plist file back to png images, but I don't know how to do this.
How to restore spriteframes packed by texture packer
1.3k Views Asked by AudioBubble At
1
I wrote a little
cocos2d
project just to achieve that a time ago. You basically useCCSpriteFrameCache
to load the plist information, and then iterate over eachspriteFrame
to 'cut' the desired piece of the atlas withCCRenderTexture
. The main logic looks like this.-Just in case anyone else found it useful, I've just uploaded the whole project to github.-
https://github.com/zuinqstudio/atlasSplitter
Hope it helps.