How to use method 'imread_from_blob' to read file from an in-memory blob?

56 views
Skip to first unread message

Javan Lu

unread,
Jul 29, 2014, 4:31:28 AM7/29/14
to python...@googlegroups.com
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?


Luis Pedro Coelho

unread,
Jul 29, 2014, 5:40:46 AM7/29/14
to python...@googlegroups.com
Yes, it should work.

You need to pass the format explicitly, though.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply all
Reply to author
Forward
0 new messages