OpenImageIO/oiio — pull request #406 by rmv (2012-07-17 11:45:08+00:00)
Title: Correction to fill_channels when a monochrome image with alpha is read into an RGBA buffer

(Please check arnold trac #2627 for sample cases)

Some Arnold users trying to use monochrome images with alpha were getting colors into their renders.

When reading a monochrome image into a 4 channel RGBA buffer, fill_channels would correctly return CCCF (where C is the original gray channel and F is options.fill value)

But when reading a monochrome image with alpha, it was turning a CA image into CAFF (where A is the original alpha)

This proposed fix conforms a CA image into CCCA when CA is read into an RGBA buffer.

Note it also changes the method signature to be able to determine if the read file had alpha or not.