macosbashclipboardpbcopy

Set clipboard to image - pbcopy


How do you set an image as the clipboard with pbcopy?

This doesn't work:

cat image.png | pbcopy

Solution

  • As stated, this won't work with pbcopy, but you can write a little objective-c program to do this: http://www.alecjacobson.com/weblog/?p=3816 . Then you can issue:

    cat image.png | impbcopy -