Page 1 of 1

How would I work with an xml texture atlas?

Posted: Thu Dec 29, 2022 10:56 pm
by GHOSTYMPA
I am trying to work out how to make a script that would get a sprite sheet and an xml file containing the coordinates, names, width and height of all sprites within it and create many sub images which are cropped automatically which would save me a lot of time.
I usually have to manually use the crop tool and find sprites myself. How would I go at this?

Re: How would I work with an xml texture atlas?

Posted: Fri Dec 30, 2022 12:34 am
by synthsin75
You'd need to use the Lua I/O functions to read the xml and then ImageLayer:SetCroppingBounds(bounds) to crop the image.