// This program copies pixel data from a file to the screeen. // It reads 256 by 256 bytes from file pic.data and makes each into a gray pixel. // C code in mpd.c makes such a file as a test. // See http://cap-lore.com/MathPhys/Hydro/Thud/java/ // about whether any FileInputStream is needed. import java.awt.*; import java.awt.image.*; import java.io.*; class Main { static int[] col = {0x00ffff, 0xff00ff, 0xffff00, 0xFFFFFF}; static final int X = 700, Y = 700; static short gs(FileInputStream s) throws IOException, java.io.FileNotFoundException {byte x = (byte)s.read(), y = (byte)s.read(); short z = (short)(((0xff&y)|(x<<8))); if (z