Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn solution []
- (let [img (javax.imageio.ImageIO/read (io/file "/Users/gerasimov_a/projects/nano-solver/100px-Greek_lc_lamda_thin.svg.png"))
- width (.getWidth img)
- height (.getHeight img)
- grid (map (fn [row] (map (fn [col] (if (= 0 (.getRGB img col row)) 0 1)) (range width))) (range height))]
- (print (map #(str (apply str %) "\n") grid))))
- (11001000100000000000
- 10111111010000000000
- 01111111101000000000
- 01111111100100000000
- 11100001110100000000
- 11011101110010000000
- 00100010111010000000
- 11000110111011000000
- 00000101111101000000
- 00001011111101000000
- 00010011111101100000
- 00110111111110100000
- 00101111101110100001
- 01011111001110110010
- 10111111010111011101
- 00111110110111000011
- 01111101110011111111
- 11111001001011111111
- 11111010000101111110
- 10000100000010001000
- )
Add Comment
Please, Sign In to add comment