OpenImageIO/oiio — pull request #672 by est77 (2013-09-23 03:55:08+00:00)
Title: Added inplace version of colorconvert. Fixed two argument version.

The version of colorconvert that takes two image arguments, was assuming that the contents of the src and dst images were the same, when the ColorProcessor::isNoOp returns true. I think this is confusing, as it's not a natural requirement of the function and it's not documented.
There's a bug related to this in maketx, when the color conversion is NoOp and half to float promotion is not needed, maketx calls colorconvert with an allocated but uninitialized dst image and colorconvert exits early, leaving
dst still uninitialized and generating an incorrect mipmap.

I modified the two arguments version of the function to just copy the pixels if the color processor is a no op and
I also added an explicit inplace version of the function that can early exit if the color conversion is not needed.