Created
July 1, 2016 20:29
-
-
Save thirdwing/fdac90fd3a14967c40e79aef814deb47 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
//java -Djava.awt.headless=true | |
import java.awt.image.BufferedImage; | |
import java.awt.image.DataBufferByte; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
public class Main { | |
public static void main(String[] args) throws IOException { | |
// write your code here | |
BufferedImage img = ImageIO.read(new File("/Users/qkou/Desktop/Dot_Blot.jpg")); | |
byte[] pixels = ((DataBufferByte) img.getRaster().getDataBuffer()).getData(); | |
System.out.println(pixels.length); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment