Sxiv: Read image from stdin

Created on 15 Oct 2016  路  8Comments  路  Source: muennich/sxiv

It would be nice if I could display an image directly supplied via stdin:

... | sxiv -

but it currently expects to read a file list, even though -i has not been specified.

Most helpful comment

imlib2 version 1.7.0 has now support for reading images from memory: imlib_load_image_from_fd()

All 8 comments

See #242 (rejected PR).

242 uses a temporary file, which indeed is easy to do with a shell wrapper.

On Sat, Oct 15 2016, .)(. wrote:

See #242 (rejected PR).

242 uses a temporary file, which indeed is easy to do with a shell wrapper.

I'm already using the <() syntax for this even without a shell wrapper,
but I wanted to avoid the temporary file in the first place.

I see the proposed patch simply converted the stream into a temporary
file, which is no better.

Why not pass directly the stdin descriptor to the image decoding
routines?

I'm already using the <() syntax for this even without a shell wrapper,

That works for you? Mind sharing an example?

On Sat, Oct 15 2016, .)(. wrote:

I'm already using the <() syntax for this even without a shell wrapper,
That works for you? Mind sharing an example?

Sorry, <() also doesn't work for me. I meant =() (which does proc
substitution through temporary files on zsh).

Ah I see, still a nice trick, thank you.

sxiv needs to use a temporary file for this, because imlib2 is not able to load an image from memory.

Sorry for bumping an old issue, but apparently imlib2 has now added support for loading images from memory. Not yet released though, but in current development branch. At least if we understood each other correctly in my upstream feature request: https://phab.enlightenment.org/T8726. (I'm not too familiar with sxiv nor imlib2, so I might have misunderstood or misexplained something.)

imlib2 version 1.7.0 has now support for reading images from memory: imlib_load_image_from_fd()

Was this page helpful?
0 / 5 - 0 ratings