Libraryless. Click here for Pure Java version (2735L/16K).
1 | static <A extends Image> A copyImageToClipboard(A img) {
|
2 | TransferableImage trans = new TransferableImage(img); |
3 | Toolkit.getDefaultToolkit().getSystemClipboard().setContents( trans, null); |
4 | vmBus_send('newClipboardContents, img);
|
5 | print("Copied image to clipboard (" + img.getWidth(null) + "*" + img.getHeight(null) + " px)");
|
6 | ret img; |
7 | } |
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: | 1100 / 1266 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |