Search in sources :

Example 1 with SpriteExporter

use of net.runelite.cache.definitions.exporters.SpriteExporter in project runelite by runelite.

the class SpriteManager method export.

public void export(File outDir) throws IOException {
    for (SpriteDefinition sprite : sprites.values()) {
        // I don't know why this happens
        if (sprite.getHeight() <= 0 || sprite.getWidth() <= 0) {
            continue;
        }
        SpriteExporter exporter = new SpriteExporter(sprite);
        File png = new File(outDir, sprite.getId() + "-" + sprite.getFrame() + ".png");
        exporter.exportTo(png);
    }
}
Also used : SpriteDefinition(net.runelite.cache.definitions.SpriteDefinition) File(java.io.File) SpriteExporter(net.runelite.cache.definitions.exporters.SpriteExporter)

Aggregations

File (java.io.File)1 SpriteDefinition (net.runelite.cache.definitions.SpriteDefinition)1 SpriteExporter (net.runelite.cache.definitions.exporters.SpriteExporter)1