package de.jeha.photo.mosaic;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

/**
 * @author jenshadlich@googlemail.com
 */
public class PhotoMosaic {

    private static final int TILE_WIDTH = 40;
    private static final int TILE_HEIGHT = 30;

    // TODO: collect cmd line arguments with args4j
    private String targetFile;
    private String inputDirectory;
    private boolean recursive = false;

    public static void main(String... args) throws IOException {
        System.setProperty("java.awt.headless", "true");

        BufferedImage image = ImageIO.read(new File("src/test/resources/sprd_logo_small.jpg"));

        BufferedImage scaledImage = ImageScaler.scale(image, TILE_WIDTH, TILE_HEIGHT);
        ImageIO.write(scaledImage, "png", new File("target/sprd_logo_small_scaled.png"));
    }

}

@@ -24,16 +24,74 @@
 osaic;%0A%0A
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A
 import j
@@ -273,16 +273,99 @@
 saic %7B%0A%0A
+    private static final Logger LOG = LoggerFactory.getLogger(PhotoMosaic.class);%0A%0A
     priv
@@ -807,209 +807,193 @@
 ces/
-sprd_logo_small.jpg%22));%0A%0A        BufferedImage scaledImage = ImageScaler.scale(image, TILE_WIDTH, TILE_HEIGHT);%0A        ImageIO.write(scaledImage, %22png%22, new File(%22target/sprd_logo_small_scaled.png%22));
+IMG_20150320_142153.jpg%22));%0A        LOG.info(%22h=%7B%7D, w=%7B%7D%22, image.getHeight(), image.getWidth());%0A%0A        BufferedImage scaledImage = ImageScaler.scale(image, TILE_WIDTH, TILE_HEIGHT);%0A
 %0A   

add logback config