Allow user to force the alpha channel to be handled as a linear value even if the color channels are sRGB.
Refactoring to reduce duplicated code.