[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading images from internal char string

From: PhilipNienhuis
Subject: Reading images from internal char string
Date: Thu, 21 Jul 2016 00:39:49 -0700 (PDT)


AFAIK (pls correct me if I'm wrong) Octave can only read images from file
(or URL, essentially a file as well).
I'd like to find a way to read images directly from a char string ("text

For some assignment I need to process a long series of rain radar images in
PNG format. 
I haul them in using urlread() in "raw" (compressed) form, IOW the very same
format in memory as it would be on disk.  To make an image out of them I
haven't found a better way yet than to first write them in raw form to to
disk (fopen, fwrite, fclose), only then to be able turn them into an image
using imread() to read them back in as an image.  
It would be a lot faster, and save disk space, if the output from urlread()
could directly be interpreted and turned into an image while the "raw" image
is still in memory, skipping disk I/O altogether.

Is this possible at all?

Stepping through imread.m I see that control finally passes to binary module
__magickread__. All the way through there I only see references to real
I saw the url option in imageIO.m but that also results in a file on disk
that is fed to __magickread__ in the end.



View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]