Libraryless. Click here for Pure Java version (4321L/28K/95K).
1 | !752 |
2 | |
3 | static int w = 45, h = 45; |
4 | |
5 | !include #1004681 // Concepts |
6 | |
7 | sconcept Corner { |
8 | bool left; |
9 | RGBImage image; |
10 | S md5; |
11 | } |
12 | |
13 | sconcept Program {} |
14 | |
15 | sconcept Chrome extends Program {} |
16 | sconcept Desktop extends Program {} |
17 | sconcept Other extends Program {} |
18 | sconcept Unknown extends Program {} |
19 | |
20 | p { |
21 | loadAndAutoSaveConcepts(); |
22 | RGBImage left = shootTopLeftCorner(w, h); |
23 | RGBImage right = shootTopRightCorner(w, h); |
24 | Corner cleft = getCorner(true, left); |
25 | Corner cright = getCorner(false, right); |
26 | //showImage(left); |
27 | //showImage(right); |
28 | } |
29 | |
30 | static Corner getCorner(bool left, RGBImage image) { |
31 | S md5 = md5OfRGBImage(image); |
32 | Corner c = findWhere(list(Corner.class), "left", left, "md5", md5); |
33 | if (c == null) { |
34 | c = new Corner; |
35 | c.left = left; |
36 | c.image = image; |
37 | c.md5 = md5; |
38 | change(); |
39 | } |
40 | ret c; |
41 | } |
Began life as a copy of #1004983
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004985 |
Snippet name: | Recognize Full-Screen Programs From Screen Corners |
Eternal ID of this version: | #1004985/1 |
Text MD5: | b92c8a9a6e37cfe7f045787b7f80ff50 |
Transpilation MD5: | c62f84cb24c2e9f2a1aa1a9bda5f0393 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-09-21 19:58:46 |
Source code size: | 860 bytes / 41 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 623 / 692 |
Referenced in: | [show references] |