Hey crew,

Working on a stable way to use memory streams (e.g. from a file placed onto a 
buffer) with ImageInput::open(...) for a live unpack test but am perplexed on 
the format_name vs. useable extension setup. In imageioplugin.cpp there is 
declare_imageio_format(...) which takes a format name. In the event that we 
provide an input_creator OIIO attempts to set the input_formats properly.

My question pertains to the following lines: (imageioplugin.cpp  line(s) 98:110)
    if (input_creator) {
        if (input_formats.find(format_name) != input_formats.end())
            input_formats[format_name] = input_creator;
        ...
    }

In the event our format_name is in the input_formats we override it. However, 
below, when setting the extensions into input_formats, we only insert when the 
extension isn't found. We do the same with output_creator.

There is also, at the top of the file a input_extensions (InputPluginMap) that 
doesn't seem to be used anywhere.

Is there a reason for this particular logic? I don't mind supplying the 
extension of the original file but ideally the app shouldn't have to know them 
(in the event it's created entirely in memory), only the format_name.

Just want to be sure.
Cheers,
Michael McCartney
This e-mail and any attachments are intended only for use by the addressee(s) 
named herein and may contain confidential information. If you are not the 
intended recipient of this e-mail, you are hereby notified any dissemination, 
distribution or copying of this email and any attachments is strictly 
prohibited. If you receive this email in error, please immediately notify the 
sender by return email and permanently delete the original, any copy and any 
printout thereof. The integrity and security of e-mail cannot be guaranteed.
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to