class SVG2Png implements Runnable {

    @Override
    public void run() {
        try {
            Files.walkFileTree(iconsFolder, new SimpleFileVisitor<Path>() {

                @Override
                public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {
                    final String fileName = file.getFileName().toString();
                    if (fileName.endsWith(".svg")) {
                        final Path svg = file
                                .getParent()
                                .resolve(fileName.substring(0, fileName.length() - ".svg".length()) + "_icon32.png");
                        if (!Files.exists(svg)) {
                            createPng(file, svg);
                            log.info("Created " + svg);
                        }
                    }
                    return super.visitFile(file, attrs);
                }
            });
        } catch (final IOException e) {
            throw new IllegalStateException(e);
        }
    }

    public  SVG2Png(final Path iconsFolder, final boolean activeWorkarounds, final Object log);

}