Read from stdin
Posted: Thu May 13, 2004 3:20 am
Is it possible to XnView read an image from "standard input" (stdin)?
I thought about a good workaround to "screen capturing" problem, but I will need XnView reading from standard input. My idea is simple. just run this on terminal:
$ sleep 2; xwd | xnview -
Where '-' would mean "read from stdin", just like most Linux utilities.
Above line does mean: wait 2 seconds, then, run xwd (X Window Dump) to capture the image. The output of xwd is redirected to input of XnView, which will open the image.
I thought about a good workaround to "screen capturing" problem, but I will need XnView reading from standard input. My idea is simple. just run this on terminal:
$ sleep 2; xwd | xnview -
Where '-' would mean "read from stdin", just like most Linux utilities.
Above line does mean: wait 2 seconds, then, run xwd (X Window Dump) to capture the image. The output of xwd is redirected to input of XnView, which will open the image.