Example usage for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor process

List of usage examples for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor process

Introduction

In this page you can find the example usage for com.badlogic.gdx.tools.texturepacker TexturePackerFileProcessor process.

Prototype

public ArrayList<Entry> process(File[] files, File outputRoot) throws Exception 

Source Link

Usage

From source file:com.kotcrab.vis.editor.util.gdx.VisTexturePacker.java

License:Apache License

static public void process(TexturePacker.Settings settings, String input, String output, String packFileName,
        FilenameFilter filter) {//from  ww  w.  j  a v a 2s.  co  m
    try {
        TexturePackerFileProcessor processor = new TexturePackerFileProcessor(settings, packFileName);
        processor.setInputFilter(filter);
        // Sort input files by name to avoid platform-dependent atlas output changes.
        processor.setComparator((file1, file2) -> file1.getName().compareTo(file2.getName()));
        processor.process(new File(input), new File(output));
    } catch (Exception ex) {
        throw new RuntimeException("Error packing images.", ex);
    }
}