Re: [Oiio-dev] Reading only Image Metadata

2017-08-08 Thread Larry Gritz
I took a stab at this: https://github.com/OpenImageIO/oiio/pull/1741 Works for me, but I'm concerned about potentially breaking something (especially with no longer calling adjust_sizes_info_only(). So if you depend on raw reading, please try

Re: [Oiio-dev] Reading only Image Metadata

2017-08-07 Thread Larry Gritz
I feel confident in saying that there is NO ONE who would prefer that the whole file be read inside open(). It would definitely be better to only read metadata in open(), and read/decode the pixels only upon the first call to one of the read_*() functions. If you're not intending to do it and

Re: [Oiio-dev] Reading only Image Metadata

2017-08-07 Thread Kenny Carruthers
Larry, Thanks for the follow-up. I guess any chances to the RawInput plugin could affect current users with regards to when they might expect the performance hit of opening a raw file. Right now, they would expect it on the call to open(), but if that was changed, the they’d have to expect it

Re: [Oiio-dev] Reading only Image Metadata

2017-08-07 Thread Larry Gritz
OIIO only guarantees that the file has been opened and the metadata read, upon open(). Ideally, the pixel data would be read only as each read_scanline or read_tile call is made, and only as much as that call needs. Less ideally, the pixel data would be read in blocks or upon the first request

Re: [Oiio-dev] Reading only Image Metadata

2017-08-07 Thread Kenny Carruthers
Based on a forum post over on libraw.org, libraw is able to extract the header information from a RAW file without unpacking it: https://www.libraw.org/node/2302 But in OIIO, what would be the correct way of telling RawInput::open() that unpack does not need to be called? Is there a way to

Re: [Oiio-dev] Reading only Image Metadata

2017-08-07 Thread Larry Gritz
Generally speaking, you can read JUST THE HEADER with the following sequence: ImageInput *in = ImageInput::open(filename); ImageSpec spec = in->spec(); // Note: NO read_scanline* or read_tile* calls here! in->close (); ImageInput::destroy (in); I would like to tell you that

Re: [Oiio-dev] Reading only Image Metadata

2017-08-06 Thread Kenny Carruthers
Larry, This is in C++ and using ImageInput. I did notice after sending my original email that in rawinput.cpp, the method read_tiff_metadata() shows how to create a new ImageInput of type ‘TIFF’ and then load data into that directly from a filename. That method completely bypasses all of the

Re: [Oiio-dev] Reading only Image Metadata

2017-08-06 Thread Larry Gritz
Before I give a full answer... C++ or Python? Or command line? ImageInput or ImageBuf or ImageCache/TextureSystem? On August 6, 2017 11:34:12 AM PDT, Kenny Carruthers wrote: >Hi, > >I’m using OpenImage IO and extracting the metadata from an image using >the