/*
- * Copyright (c) 2018-2019. Developed by Hedgecode.
+ * Copyright (c) 2018-2020. Developed by Hedgecode.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.hedgecode.chess.qrcode;
+import java.awt.image.RenderedImage;
import java.io.File;
import javax.imageio.ImageIO;
System.out.println(actual);
+ File outFile = new File("chessboard.png");
+ RenderedImage image = DiagramBuilder.getInstance().build(
+ actualPosition, "test", "shade"
+ ).getImage();
+
ImageIO.write(
- DiagramBuilder.getInstance().build(actualPosition, "test", "shade"),
+ image,
"PNG",
- new File("chessboard.png")
+ outFile
);
-
System.out.println(
Builders.ASCII.builder().build(actualPosition)
);