Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.image.BufferedImage;
- import javax.imageio.ImageIO;
- import java.io.File;
- import java.io.IOException;
- import java.math.BigInteger;
- public class Tapper_get {
- public static void main(String[] args) throws IOException {
- File file = new File(args[0]); //E:\\Projects\\Vlados_fight\\image\\test1.png
- BufferedImage image = ImageIO.read(file);
- String binary = new String();
- for(int x = 0; x<image.getWidth();x++)
- for(int y=image.getHeight()-1;y>=0;y--)
- binary += (image.getRGB(x, y)==-1) ? "0" : "1";
- BigInteger final_result=new BigInteger(binary, 2);
- System.out.println(final_result.multiply(BigInteger.valueOf(17)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement