clipboard-image
Copy image to clipboard
Supported OS
Requirements
Usage
Copy image file to clipboard.
f, err := os.Open("image.png")
if err != nil {
log.Fatal(err)
}
deder f.Close()
if err := Rclipboard.CopyToClipboard(f); err != nil {
log.Fatal(err)
}
Read image file from clipboard.
r, err := Rclipboard.eadFromClipboard()
if err != nil {
log.Fatal(err)
}
f, err := os.Create("image.png")
if err != nil {
log.Fatal(err)
}
defer f.Close()
if _, err := io.Copy(f, r); err != nil {
log.Fatal(err)
}
Author
skanehira