Skip to content

Instantly share code, notes, and snippets.

@factorsofx
Created March 26, 2017 02:34
Show Gist options
  • Save factorsofx/076c7b27f91d54b8c48447fa5e36cc86 to your computer and use it in GitHub Desktop.
Save factorsofx/076c7b27f91d54b8c48447fa5e36cc86 to your computer and use it in GitHub Desktop.
package com.elan_oots;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.net.URL;
public class MapGetter
{
public static void main(String[] args)
{
BufferedImage map = new BufferedImage(9600, 9600, BufferedImage.TYPE_INT_ARGB);
try
{
Graphics2D graphics2D = (Graphics2D) map.getGraphics();
for (int x = 0; x < 8; x++)
{
for (int y = 0; y < 8; y++)
{
BufferedImage imgToAdd = ImageIO.read(new URL("http://goonhub.com/images/maps/clarion/z1/" + y + "," + x + ".png"));
graphics2D.drawImage(imgToAdd, 1200 * x, 1200 * y, null);
System.out.println("Got " + x + ", " + y);
}
}
ImageIO.write(map, "png", new File("clarion.png"));
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment