mirror of
https://github.com/13hannes11/xkcd_poster_creator.git
synced 2024-09-03 21:50:58 +02:00
Initial commit
This commit is contained in:
29
src/Main.java
Normal file
29
src/Main.java
Normal file
@@ -0,0 +1,29 @@
|
||||
import xkcd.construction.ImageArranger;
|
||||
import xkcd.construction.ImageDataLoader;
|
||||
import xkcd.construction.ImageSticher;
|
||||
import xkcd.rectangle.imagepath.PathRectangle;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
||||
public class Main {
|
||||
|
||||
static final String PATH = "C:\\Users\\Hannes\\xkcd\\";
|
||||
|
||||
public static void main(final String[] args) throws IOException {
|
||||
System.out.println("Loading Now!");
|
||||
final ImageDataLoader loader = new ImageDataLoader();
|
||||
Collection<PathRectangle> images = loader.load(new File(PATH));
|
||||
|
||||
System.out.println("Arranging Now!");
|
||||
final ImageArranger arranger = new ImageArranger();
|
||||
images = arranger.arrangeRectangles(images, 3D / 2D);
|
||||
System.out.println("Count: " + images.size());
|
||||
|
||||
System.out.println("Saving Now!");
|
||||
final ImageSticher sticher = new ImageSticher(images);
|
||||
sticher.saveImage(new File("C:\\Users\\Hannes\\Desktop\\savedNew.png"));
|
||||
System.out.println("DONE!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user