Download Jar. Uses 6490K of libraries. Click here for Pure Java version (9056L/64K).
!7 static WebcamPanel panel; static bool savingOn = true; static double saveEvery = 10.0; static volatile File latestSaved; p { restartWith128MBHeap(); outBuf(50000); substance(); selectWebCam(voidfunc(Webcam cam) { panel = new WebcamPanel(cam, true); panel.setFPSDisplayed(true); frameIcon(#1009177, exitProgramOnFrameClose(alwaysOnTop(showPackedFrame("JavaX Live WebCam", panel))); bot("WebCam."); doEvery_daemon_now(saveEvery, f saveDefault); }); hideConsole(); } answer { if "save jpeg at *" { saveJPEG(newFile($1), imageFromWebcamPanel(panel)); ret "OK"; } if "latest file" ret latestSaved == null ? "Not saved yet" : "OK " + quote(f2s(latestSaved)); } svoid saveDefault { if (!savingOn) ret; File file = newFile(javaxDataDir(), "WebCam", ("webcam-" + dateWithSecondsForFile() + ".jpg"); saveJPEG(file, imageFromWebcamPanel(panel)); latestSaved = file; }
Began life as a copy of #1010735
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: | #1013489 |
Snippet name: | JavaX Live WebCam - Show live webcam image in frame v4 [with cam selection] |
Eternal ID of this version: | #1013489/7 |
Text MD5: | 63792d1c767f46c5965e4280c1d9b50e |
Transpilation MD5: | e09e16961ba8694b4cc2653e8a1fb931 |
Author: | stefan |
Category: | javax / desktop / camera |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-30 17:05:51 |
Source code size: | 963 bytes / 37 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 546 / 1710 |
Version history: | 6 change(s) |
Referenced in: | [show references] |