On Jun 18, 2014, at 11:44 AM, Mark Boorer <[email protected]> wrote:
> Perhaps if we only specify the thumbnail_width, thumbnail_height and > thumbnail_nchannels attributes, leaving out the thumbnail_image, that could > be the hint to generate the thumbnail? I'm ok with that. > Could the thumbnail generation happen at the image closing time? If we generate the thumbnail at the end, it implies that we have to buffer something, either the thumbnail (accumulating into it as we go) or the whole image (lots of memory, and a big refactor of the EXR ImageOutput code because essentially all the file I/O has to be delayed until close). Does the underlying OpenEXR library (libIlmImf) allow you to open the file, specify the header, write the scanlines/tiles, and THEN supply the thumbnail? I'm not sure. The "buffer the thumbnail and accumulate as we go" strategy only works if this is true. Otherwise, there's not much choice other than buffer the whole image, which is undesirable for a number of reasons. Another possibility is not to put this feature into the ImageOutput at all, but rather make it as quick and easy a feature as possible in oiiotool, and any app that wants to write a thumbnailed EXR should write it without thumbnail and then shell out to run the "add a thumbnail to this file" command. -- Larry Gritz [email protected] _______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
