Libraryless. Click here for Pure Java version (4092L/28K/96K).
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<RGBImage> imgs; |
16 | for y to 8: { |
17 | new L<Rect> l; |
18 | for x to 8: l.add(square(x, y)); |
19 | imgs.add(mergeImagePartsHorizontally(board, l)); |
20 | } |
21 | showImage(mergeImagesVertically(imgs)); |
22 | } |
23 | |
24 | static Rect square(int x, int y) { |
25 | ret pointsRect( |
26 | boardW*x/8, boardH*y/8, |
27 | boardW*(x+1)/8, boardH*(y+1)/8); |
28 | } |
Began life as a copy of #1006076
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: | #1006082 |
Snippet name: | Find Chess Board 2 [v2, show whole board of test case] |
Eternal ID of this version: | #1006082/1 |
Text MD5: | 475f763b3e80fbb897aac59ff0f7a015 |
Transpilation MD5: | 2066644ddfac9022e874cd2c6a26873f |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-17 14:05:18 |
Source code size: | 683 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 595 / 716 |
Referenced in: | [show references] |