-
-
Save guest271314/13739f7b0343d6403058c3dbca4f5580 to your computer and use it in GitHub Desktop.
screenshot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`$ flameshot full -c` | |
``` | |
onfocus = async _ => { | |
onfocus = null; | |
const [item] = await navigator.clipboard.read(); | |
const canvas = document.createElement('canvas'); | |
const bitmap = await createImageBitmap(await item.getType(item.types[0])); | |
console.log(bitmap); | |
canvas.height = bitmap.height; | |
canvas.width = bitmap.width; | |
const ctx = canvas.getContext('bitmaprenderer'); | |
ctx.transferFromImageBitmap(bitmap); | |
document.body.appendChild(canvas); | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jimmywarting
Re w3c/mediacapture-screen-share#145 will incorporate the above into a directory at https://github.com/guest271314/quictransport for testing.