Created
May 16, 2015 17:44
-
-
Save matthewd673/4ef53a02d42b37843cf1 to your computer and use it in GitHub Desktop.
A simple class to load images from URLs (used for MiniLD #59)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bitbit.minild59.codes.main; | |
import java.awt.image.BufferedImage; | |
import java.io.IOException; | |
import java.net.URL; | |
import javax.imageio.ImageIO; | |
public class LoadSprites | |
{ | |
public static BufferedImage sprites; | |
public static void DownloadSprites() | |
{ | |
try | |
{ | |
URL url = new URL("http://swapshop.pixelsyntax.com/api/randomImage"); | |
sprites = ImageIO.read(url); | |
} | |
catch (IOException e) | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment