Libraryless. Click here for Pure Java version (2735L/16K).
static <A extends Image> A copyImageToClipboard(A img) { TransferableImage trans = new TransferableImage(img); Toolkit.getDefaultToolkit().getSystemClipboard().setContents( trans, null); vmBus_send('newClipboardContents, img); print("Copied image to clipboard (" + img.getWidth(null) + "*" + img.getHeight(null) + " px)"); ret img; }
Began life as a copy of #1005363
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006060 |
Snippet name: | copyImageToClipboard |
Eternal ID of this version: | #1006060/4 |
Text MD5: | b8e37ec7a66e707b91d3dc230ed1cc57 |
Transpilation MD5: | 3ef7d225245bf0f0c9b94e8d584ab6fc |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-01-04 00:02:23 |
Source code size: | 351 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 639 / 735 |
Version history: | 3 change(s) |
Referenced in: | [show references] |