Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online source for images (download and convert) #358

Open
dreadedhamish opened this issue Oct 28, 2022 · 2 comments
Open

Online source for images (download and convert) #358

dreadedhamish opened this issue Oct 28, 2022 · 2 comments

Comments

@dreadedhamish
Copy link

I'm getting errors when trying to use a URL for the source of an image load - "VipsForeignLoad... jpg does not exist"
Am I right in assuming that online sources of images aren't able to be processed by pyvips?

I was hoping to avoid actually saving the original remote image (and then circling back to delete it).

Alternatively would it be possible to pass a response from Requests straight to pyvips and avoid a disk write?

@jcupitt
Copy link
Member

jcupitt commented Oct 28, 2022

Hi @dreadedhamish,

Sure, it should work.

Did you see the examples? This does load / save to stdin / stdout:

https://github.com/libvips/pyvips/blob/master/examples/stdio.py

It'd simple to hook it up to a pair of pipes. This one does a full custom source and target:

https://github.com/libvips/pyvips/blob/master/examples/connection.py

So you could connect pyvips to anything that can read or write a sequence of bytes.

@dreadedhamish
Copy link
Author

@jcupitt thanks so much!
I had a good look around but perhaps I don't have all the terminology down yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants