Created
July 21, 2013 21:30
-
-
Save EFox2413/6050065 to your computer and use it in GitHub Desktop.
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 hackThisSite2; | |
import java.io.*; | |
import java.awt.image.*; | |
class Mission2 { | |
public static void main(String[] args) { | |
BufferedImage img = null; | |
try { | |
img = javax.imageio.ImageIO.read(new File("C:\\Users\\Fox\\Downloads\\mission2.png")); | |
} catch (IOException e) { | |
} | |
int minx = img.getMinX(); | |
int miny = img.getMinY(); | |
int maxx = img.getTileWidth(); | |
System.out.println("The maximum number of tiles in the x dir is: " + maxx); | |
for(int x = minx; x != maxx; x++) { | |
System.out.println("pixel at " + x + ", " + miny + " is: " + img.getRGB(x, miny)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment