Read from stdin

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
crazytb
Posts: 124
Joined: Wed Oct 15, 2003 2:51 am
Contact:

Read from stdin

Post by crazytb »

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.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Read from stdin

Post by xnview »

crazytb wrote: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.
You can use nview with stdin
Pierre.
crazytb
Posts: 124
Joined: Wed Oct 15, 2003 2:51 am
Contact:

Re: Read from stdin

Post by crazytb »

xnview wrote:You can use nview with stdin
You mean xwd | nview -in xwd stdin. This works, but I want XnView functionality (toolbars, save, filters...), which nview does not have.
Post Reply