|
|
|
@ -1,10 +1,14 @@ |
|
|
|
|
import java.io.BufferedInputStream; |
|
|
|
|
import java.io.DataInputStream; |
|
|
|
|
import java.io.DataOutputStream; |
|
|
|
|
import java.io.File; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.net.ServerSocket; |
|
|
|
|
import java.net.Socket; |
|
|
|
|
import java.util.Map.Entry; |
|
|
|
|
|
|
|
|
|
import javax.imageio.ImageIO; |
|
|
|
|
|
|
|
|
|
import java.awt.AWTException; |
|
|
|
|
import java.awt.Rectangle; |
|
|
|
|
import java.awt.Robot; |
|
|
|
@ -158,6 +162,11 @@ class Server |
|
|
|
|
System.out.println((img.getRGB(100,0)&(255<<8))>>8); |
|
|
|
|
System.out.println((img.getRGB(100,0)&(255<<16))>>16); |
|
|
|
|
System.out.println((img.getRGB(100,0)&(255<<24))>>24); |
|
|
|
|
try { |
|
|
|
|
ImageIO.write(img,"png",new File("debug.png")); |
|
|
|
|
} catch (IOException e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
for (int i=img.getWidth()-1;i>=0;i--){ |
|
|
|
|
if ((img.getRGB(i,0)&255)>100){ |
|
|
|
|
return i/(img.getWidth()-1)*100; |
|
|
|
|