Slice tool: How does it work?

Exactly! There is a little trick used by the default theme to auto-export/import slices into a XML file. For example, if your file is called sheet.png, you can create a sheet.aseprite-data with the following content:

<?xml version="1.0" encoding="utf-8"?>
<sprite>
  <slices />
</sprite>

And when you save the .png file the content of the XML file will be updated automatically to something like:

<?xml version="1.0" encoding="utf-8" ?>
<sprite>
    <slices>
        <slice id="Slice1" color="#0000ff">
            <key frame="0" x="4" y="15" w="11" h="11" />
        </slice>
        <slice id="Slice2" color="#0000ff">
            <key frame="0" x="3" y="5" w="3" h="7" />
        </slice>
    </slices>
</sprite>

Slices are saved internally in .ase files, but this trick might be useful to have a .png + XML information about slices. (In the future this .aseprite-data file might be updated with more information about the sprite, layers, frames, etc.)

1 Like