Uses 5262K of libraries. Click here for Pure Java version (1175L/8K/28K).
1 | !752 |
2 | |
3 | import ai.d.ai17.*; |
4 | |
5 | lib 1003956 // TinyBrain |
6 | |
7 | p { |
8 | new DesktopRecognizer rec; |
9 | rec.setKeepScreenshot(true); |
10 | S result; |
11 | long time = now(); |
12 | result = rec.run411(); |
13 | done(time, "411"); |
14 | MultiMap<S, Rectangle> hashes = irParseHashes(result); |
15 | printStructure(hashes); |
16 | |
17 | for (S hash : hashes.keySet()) { |
18 | File file = getImgFile(hash); |
19 | if (file.exists()) continue; |
20 | L<Rectangle> rects = hashes.get(hash); |
21 | Rectangle r = first(rects); |
22 | BufferedImage clip = rec.getScreenshot().clip(r).getBufferedImage(); |
23 | savePNG(clip, file); |
24 | print("Saved " + file.getAbsolutePath() + " (" + n(file.length(), "byte") + ")"); |
25 | } |
26 | print("Hashes found: " + hashes.keySet().size()); |
27 | } |
28 | |
29 | static File getImgFile(S hash) { |
30 | ret prepareProgramFile("images/" + hash + ".png"); |
31 | } |
Began life as a copy of #1003954
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003959 |
Snippet name: | Run 411 Segmenter on Screen & Save Images Frantically |
Eternal ID of this version: | #1003959/1 |
Text MD5: | 36530ac6a74271a55a7ddebd42bebc8b |
Transpilation MD5: | ccfb22b1f6b9e39895b9e69d4b5fbef4 |
Author: | stefan |
Category: | javax / desktop recognition |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-07-31 18:49:11 |
Source code size: | 819 bytes / 31 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 619 / 681 |
Referenced in: | [show references] |