Addressed this with new queries in this code review: https://github.com/OpenImageIO/oiio/pull/1577
Do you work from master, or will you need this backported to 1.7? > On Dec 5, 2016, at 10:04 PM, Larry Gritz <[email protected]> wrote: > > You can ask for the full list of formats like this: > > std::string formats; > OIIO::getattribute("format_list",formats); > > And you'll get a comma-separated list of all the supported formats. > > But that doesn't tell you which are read-only. You could figure it out, as > you say, by trying to instantiate an ImageOutput for each one, but that seems > wasteful. It would be better if you could directly query the set of writeable > formats. I'll add a query like that, it should be straightforward. > > > >> On Dec 2, 2016, at 12:05 PM, Jonathan Tilden (2K) <[email protected]> >> wrote: >> >> Hi! >> >> I was wondering if there was a way to determine which types support write >> capabaility using OIIO. >> >> For example, I'd like to present a list of options in a save-as dialog that >> lists the image types that are 1) known to OIIO, and 2) have valid >> ImageOutput implementations. For example, PSD doesn't look to have a valid >> ImageOutput implemention, so I would not list that as an available type. >> >> I know you can check the results from trying to open the ImageOutput to >> determine if you can save, but is there a higher-level way to do this before >> even attempting to write the file? >> >> Is this possible and if so, what would be the best way to get at it? >> >> Thanks! >> -J >> >> ==================================== >> Jonathan Tilden >> Principal Technical Artist >> 2K Games >> Email: [email protected] >> Phone: +1.415.507.7623 >> ==================================== >> >> _______________________________________________ >> Oiio-dev mailing list >> [email protected] >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > -- > Larry Gritz > [email protected] > > > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected] _______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
