package mosaik;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

import util.simpleIO.Out;

public class RunMosaik {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException, ClassNotFoundException {
		
		int partsX = 10;
		int partsY = 10;
		float resize = 1f;
		File searchPicFile = new File("./testdaten/big/_8147226.JPG");
		//File searchPicFile = new File("./testdaten/big/_8147228.JPG");
		File dbFile        = new File("./testdaten/alt/DataBase0.db");
		
		BufferedImage mosaikImage = MosaikFunctions.makeMosaik(searchPicFile, dbFile, partsX, partsY, resize);
		ImageIO.write(mosaikImage, "png", new File("mosaikImage.png"));
		//ImageIO.write(mosaikImage, "jpg", new File("mosaikImage.jpg"));
		//storeJPG(mosaikImage, new File("mosaikImage_4+.jpg"), 1);
		Out.pl("Fertig....File gespeichert"); 
	}

}
