diff --git a/img.png b/img.png index 1b41e9c..67eb141 100644 Binary files a/img.png and b/img.png differ diff --git a/src/main/java/galaxyoyo/unknown/client/main/Main.java b/src/main/java/galaxyoyo/unknown/client/main/Main.java index 10dad62..9f19699 100644 --- a/src/main/java/galaxyoyo/unknown/client/main/Main.java +++ b/src/main/java/galaxyoyo/unknown/client/main/Main.java @@ -3,6 +3,7 @@ */ package galaxyoyo.unknown.client.main; +import galaxyoyo.unknown.editor.Editor; import galaxyoyo.unknown.frame.MainFrame; import java.awt.Color; @@ -184,6 +185,13 @@ public class Main g.drawLine(0, y, width, y); } + Byte[] bytes = Editor.toBytes(baseWidth, baseHeight); + + for (byte b : bytes) + { + System.err.print(b); + } + try { ImageIO.write(image, "png", new File("img.png")); diff --git a/src/main/java/galaxyoyo/unknown/editor/Editor.java b/src/main/java/galaxyoyo/unknown/editor/Editor.java new file mode 100644 index 0000000..6c8ed10 --- /dev/null +++ b/src/main/java/galaxyoyo/unknown/editor/Editor.java @@ -0,0 +1,25 @@ +package galaxyoyo.unknown.editor; + +import java.util.ArrayList; +import java.util.List; + +public class Editor +{ + public static Byte[] toBytes(int width, int height) + { + List bytes = new ArrayList(); + + for (int x = 1; x < width; x += 16) + { + for (int y = 1; y < height; y += 16) + { + bytes.add((byte) 0); + } + bytes.add(Byte.MIN_VALUE); + } + + bytes.remove(bytes.lastIndexOf(Byte.MIN_VALUE)); + + return bytes.toArray(new Byte[0]); + } +}