Libraryless. Click here for Pure Java version (5650L/39K/138K).
1 | !752 |
2 | |
3 | static RGBImage board; |
4 | static int boardW, boardH; |
5 | |
6 | p { |
7 | BufferedImage screen = loadBufferedImage("#1006074"); |
8 | Rect boardRect = pointRect(194, 179, 501, 485); |
9 | board = new RGBImage(screen).clip(boardRect); |
10 | boardW = board.w(); |
11 | boardH = board.h(); |
12 | //showImage(board); |
13 | //showImage(square(0, 0)); |
14 | //showImage(square(7, 7)); |
15 | new L<Rect> l; |
16 | for x to 8: l.add(square(x, 0)); |
17 | for x to 8: l.add(square(x, 7)); |
18 | showImage(mergeImagePartsHorizontally(board, l)); |
19 | } |
20 | |
21 | static Rect square(int x, int y) { |
22 | ret pointsRect( |
23 | boardW*x/8, boardH*y/8, |
24 | boardW*(x+1)/8, boardH*(y+1)/8); |
25 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006076 |
Snippet name: | Find Chess Board [v1, just show the test case] |
Eternal ID of this version: | #1006076/1 |
Text MD5: | 1231b93bbca6b9d7394489979e60438d |
Transpilation MD5: | f80e489eee2987dd383224f1f15380fe |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-02-23 09:28:38 |
Source code size: | 624 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 543 / 631 |
Referenced in: | [show references] |