Jerod Santo changelog.com/posts

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.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00