public void startGen(int depth) {
        org.jis.Main main = PluginIntegrator.getMain();
        File[] files = PluginIntegrator.getFiles();
        for (int i = 0; i < files.length; i++) {
            String tempDir = System.getProperty("java.io.tmpdir");
            Options options = Options.getInstance();
            String width = Integer.toString(options.getHmax());
            String height = Integer.toString(options.getVmax());
            String quality = Integer.toString((int) (options.getQuality() * 100));
            String[] args = new String[5];
            args[0] = "input=" + files[i].getPath();
            args[1] = "output=" + tempDir + files[i].getName();
            args[2] = "quality=" + quality;
            args[3] = "hmax=" + width;
            args[4] = "vmax=" + height;

            if (!checkPath(options.getOutput_dir(), false)) {
                new File(options.getOutput_dir()).mkdirs();
            }

            main.main(args);

            String in = tempDir + "\\" + files[i].getName();
            String out = options.getOutput_dir() + "\\" + files[i].getName();
            Main.genStrings(in, out, depth);
        }
    }