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

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.

News Films

Our little film studio focuses on telling developer-centric stories that need to be seen.

Beyond Code: Season 3 / GopherCon 2015

 
0:00 / 0:00