Discussion:
How to use method 'imread_from_blob' to read file from an in-memory blob?
Javan Lu
2014-07-29 08:31:28 UTC
Permalink
Hi Luis,

I need to read file from an in-memory blob, and there is a method named
'imread_from_blob' in the source code.

def imread_from_blob(blob, formatstr, as_grey=False, return_metadata=False):
'''
imdata = imread_from_blob(blob, formatstr, as_grey=False,
return_metadata={True})
imdata,metadata = imread_from_blob(blob, formatstr, as_grey={False},
return_metadata=True)

Read an image into a ndarray from an in-memory blob.

But this method was not memtioned in the API document.
Can I use this method to read file from an in-memory blob?
--
You received this message because you are subscribed to the Google Groups "pythonvision" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonvision+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Luis Pedro Coelho
2014-07-29 09:40:36 UTC
Permalink
Yes, it should work.

You need to pass the format explicitly, though.
Post by Javan Lu
Hi Luis,
I need to read file from an in-memory blob, and there is a method named
'imread_from_blob' in the source code.
def imread_from_blob(blob, formatstr, as_grey=False,
'''
imdata = imread_from_blob(blob, formatstr, as_grey=False,
return_metadata={True})
imdata,metadata = imread_from_blob(blob, formatstr, as_grey={False},
return_metadata=True)
Read an image into a ndarray from an in-memory blob.
But this method was not memtioned in the API document.
Can I use this method to read file from an in-memory blob?
--
You received this message because you are subscribed to the Google
Groups "pythonvision" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
You received this message because you are subscribed to the Google Groups "pythonvision" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonvision+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Loading...