OpenImageIO icon indicating copy to clipboard operation
OpenImageIO copied to clipboard

[FEATURE REQUEST] oiiotool op graph introspection

Open Shootfast opened this issue 2 years ago • 0 comments
trafficstars

Following from a discussion on slack, there was a desire for oiiotool to be able to modify/supply parameters to its own ImageInput readers based on the connected ImageOutput writers.

At present oiiotool parses its arguments in order of declaration, so by the time the output declarations are reached, all the ImageInput's are already instanced. The workaround is currently to use --iconfig to manually specify any desired changes to the ImageInput, but there may be cases where we would like these changes to happen "automagically".

Use case could include: * Avoiding lossy conversions when round tripping image formats * Minimizing data type conversions (eg uint8->float->uint8) * Allowing inter-op communication

A simple implementation might just be to parse the ops into a graph prior to instantiation, and write a small query API to allow introspection.

Shootfast avatar Sep 18 '23 19:09 Shootfast