Could you want to create a image file via command line with OS X Clipboard containing a image captured?

use this:

jcsalterego/pngpaste