The link above points me to the following code snippet for reading with ioproxy.
const void *buf = ...; // pointer to memory blocksize_t size = ...; // length of memory block ImageSpec config; // ImageSpec describing input configuration optionsFilesystem::IOMemReader memreader (buf, size); // I/O proxy objectvoid *ptr = &memreader;config.attribute ("oiio:ioproxy", TypeDesc::PTR, &ptr); ImageSpec spec;auto in = ImageInput::open ("in.exr", spec, &config);in->read_image (...);in->close(); the call i'm having trouble compiling is auto in = ImageInput::open ("in.exr", spec, &config); I looked at RB-2.1 and the master branch and in both cases this signature requires an object? I looking at imageio.h the only static method for open has the following signature static unique_ptr open (const std::string& filename, const ImageSpec *config = nullptr); Maybe i'm not looking at the right branch? On Mon, Dec 16, 2019 at 10:56 AM Larry Gritz <l...@larrygritz.com> wrote: > Yes, I just fixed that in the source a couple days ago! > > I think the current docs for master should be updated already: > https://openimageio.readthedocs.io/en/master/imageinput.html > And the 2.1 ones will be fixed upon the next release. > > > > On Dec 16, 2019, at 10:24 AM, hyper654 <hyper...@gmail.com> wrote: > > I'm interested in using ioproxy to read exr file from a stream. I've been > looking through the documentation on how to read a file from memory buffer > but have noticed that some of the sample code is out of date? > The example on page 72 of the pdf has > ImageInput *in = ImageInput::open ("in.exr", spec, &config); > > This overload is no longer static > > https://github.com/OpenImageIO/oiio/blob/RB-2.1/src/include/OpenImageIO/imageio.h > - Line 977 > I attempted to work around this by creating an object first via > ImageInput::create, however i'm crashing. I'm wondering if there is an > updated doc I can look at on how to properly use ioproxy? > > Looking at github, > -- > -Jose Medina > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > > -- > Larry Gritz > l...@larrygritz.com > > > > > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > -- -Jose Medina
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org