Skip to content

howto read image data from stdin #1915

Closed
@ewelot

Description

@ewelot

I kindly ask for help on the topic of reading image data from stdin (in a python program). I have tried something like

    source = pyvips.Source.new_from_descriptor(sys.stdin.fileno())
    img1 = pyvips.Image.new_from_source(source, '')

but this does not succeed. Probably I need to provide more information about the image data (which loader to use?) to the program. Or use another approach?

I am aware of this article but failed to adopt it. I must confess that I am a both a newbie on libvips and not very familiar with python coding either ...

Would be great if you could provide a simple example.
Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions