Uses 6469K of libraries. Click here for Pure Java version (4611L/32K/120K).
1 | !7 |
2 | |
3 | p-subst {
|
4 | BufferedImage img = cast time(f singleImagePreferablyFromLastWebcam); |
5 | if (img == null) { infoBox("Got no image"); ret; }
|
6 | ImageSurface is = showImage("Will upload in 3! Close window to stop this.", img);
|
7 | hideConsole(); |
8 | sleepSeconds(3); |
9 | if (!is.isShowing()) {
|
10 | infoBox("Upload cancelled.");
|
11 | ret; |
12 | } |
13 | setFrameTitle(is, "Uploading..."); |
14 | S imageURL = uploadJPEGToImageServer(img, "User webcam image"); |
15 | print("Image uploaded as " + imageURL);
|
16 | setFrameTitle(is, "Posting..."); |
17 | if (postToStefansChat("[IMAGE] " + imageURL))
|
18 | setFrameTitle(is, print("Posted image to chat!"));
|
19 | else |
20 | setFrameTitle(is, print("Could not post image."));
|
21 | } |
Began life as a copy of #1009023
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: | #1009033 |
| Snippet name: | Upload webcam image to Stefan's Chat [WORKS, uses JPG] |
| Eternal ID of this version: | #1009033/8 |
| Text MD5: | f9c726f056dfcdedfebbbd5b2e740cb7 |
| Transpilation MD5: | a14b413c5ab28e384b2192f0d581ccd4 |
| Author: | stefan |
| Category: | javax / desktop / camera |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-06-30 18:06:26 |
| Source code size: | 697 bytes / 21 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 771 / 1130 |
| Version history: | 7 change(s) |
| Referenced in: | [show references] |