Libraryless. Click here for Pure Java version (6351L/44K/150K).
!7 static ScreenLens lens; static JLabel lblResult; static new SingleThread singleThread; static long time; p-substance { lens = new ScreenLens().start(); lblResult = jMinWidth(50, jlabel()); addToWindow(lens.is, withTopMargin(lblResult)); lens.onImageChange = r { //if (time != 0) print((sysNow()-time) + " ms"); //time = sysNow(); singleThread.run(r { setText(lblResult, analyze(lens.is.getImage())) }); }; } static S analyze(BufferedImage img) { //RGBImage rgb = new RGBImage(img); BWImage bw = new BWImage(img); ret "Brightness: " + bw.averageBrightness(); }
Began life as a copy of #1006520
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006527 |
Snippet name: | Screen Lens With Demo Analyzer |
Eternal ID of this version: | #1006527/1 |
Text MD5: | b6dc2608b0b35108093563fad7bbad16 |
Transpilation MD5: | d3ec111fa39247f6cb4c9e8e9ed83f22 |
Author: | stefan |
Category: | javax / gui / ocr |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-01-15 16:07:36 |
Source code size: | 627 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 536 / 700 |
Referenced in: | #1006531 - Screen Lens With Demo Analyzers |