Improve colorconvert heuristic for case with OCIO, but spaces not found. (#1554)
Improve colorconvert heuristic for case with OCIO, but spaces not found. (#1554)

The specific case is OCIO is present, a straightforward color conversion
is requested such as "sRGB" to "linear", but because the particular OCIO
config doesn't know about sRGB, it fails. That's silly, we still know
how to apply the sRGB transforms.

So, if OCIO fails to find a suitable transform, we place a hold on the
error until we check the set of transformations we can implement even
when no OCIO is found. If it's still not found, then we pass along the
error as usual. Also, we assume that the very common names "lnh" and
"lnf" are synonyms for "linear" (for the purposes of sRGB conversion),
even if they are not marked as such.

I know, the color purists will have all sorts of very technically
correct reasons to think this is wrong. And it is. But it's the lesser
evil, compared to having a failure to convert a JPEG (which knows it's
in sRGB) into some linear space. I think that in this case, it's better
to do the "common sense" thing, even though there are a whole lot of
ways it can be a little bit wrong (for example, if the facility's linear
space uses different color primaries than sRGB).
OpenImageIO/oiio,OpenImageIO/oiio,OpenImageIO/oiio,lgritz/oiio,lgritz/oiio,OpenImageIO/oiio,lgritz/oiio,lgritz/oiio