OpenImageIO/oiio — pull request #664 by brechtvl (2013-08-29 15:08:40+00:00)
Title: TGA unassociated alpha fixes

TGA now converts alpha to associated on input if requested, and to unassociated on output. TGA does support storing both types of alpha but many implementations seem to assume unassociated so always write it that way.

The existing implementation entirely ignores the premultiplied flag so I doubt it was working that well, but maybe some people relied on it? Hopefully not.

The associateAlpha and deassociateAlpha were copied from pnginput.cpp and pngoutput.cpp, it would be nice to not have the code duplicated but I'm not sure where they should be placed then.