Shared posts

28 Sep 13:22

What if you could copy/paste an image directly to a file from the command line?

by Jerod Santo

Many Mac-based hackers know and love pbcopy and pbpaste (more info). But wouldn’t it be cool if you could copy image data to your clipboard and paste it directly to a file from the command line?

Good news! pngpaste lets you do just that.

Install it by brew install pngpaste or grab the source and make all && sudo make install. Then you just copy an image and pngpaste mypic.png.

What’s more? The meat of the source weighs in at a whopping 33 lines of code. I love when powerful frameworks let hackers do so much with so little.


Subscribe to The Changelog Weekly - our free weekly email covering everything that hits our open source radar.
The post What if you could copy/paste an image directly to a file from the command line? appeared first on Subscribe to The Changelog.