Skip to content

Instantly share code, notes, and snippets.

@slaskis
Created February 17, 2011 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slaskis/832967 to your computer and use it in GitHub Desktop.
Save slaskis/832967 to your computer and use it in GitHub Desktop.
var fs = require("fs")
, cp = require("child_process");
var t1 = fs.createReadStream("./explode_problem.jpg");
t1.pause()
var t2 = fs.createReadStream("./explode_problem.jpg");
t2.pause()
var proc = cp.spawn("identify",["-"])
proc.stdout.pipe(process.stdout)
t1.pipe(proc.stdin)
t1.resume()
t2.resume() // throws TypeError: Bad argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment