Reputation: 76057
I am using Python Imaging Library to do some processing, and I'd like to feed my script with data through a pipe rather than passing a file name as an argument.
I've seen that Image.open
can accept any file-like object besides a string as parameter. I've tried passing sys.stdin
directly, but it seems that it is having some problems with seek
(logically).
So, how can I wrap the stream into a buffer that provides all the file operations? (or other any suitable solution to read the image directly from stdin
).
Upvotes: 2
Views: 2477