Jul 9, 2013 at 5:59 PM
Edited Jul 9, 2013 at 5:59 PM
Which release are you using?
I added support to June 2013 release which will check for the sRGB colorspace in the PNG file. The limitation is that the returned DXGI_FORMAT must have an SRGB equivalent. That means if it loaded as a DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_B8G8R8A8_UNORM,
or a DXGI_FORMAT_B8G8R8X8_UNORM and the PNG contains the 'sRGB' tag, the functions will return them as DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, or DXGI_FORMAT_B8G8R8X8_UNORM_SRGB.
The -srgbi switch basically forces the loaded format to an _SRGB equivalent IF AVAILABLE (see the library function MakeSRGB). -srgbo does the same thing for output. Since you are specifying -f BC3_UNORM_SRGB as the output format here, the -srgbo is ignored.
Prior to the June 2013 release, the library did not properly handling sRGB conversions so that is also a possible source of problems. If you have both -srgbi and -srgbo set, it doesn't perform any color space conversion so if the source image is in linear RGB,
then rendering as BC3_UNORM_SRGB is going to result in a different color.
I suspect you need to use a newer release and then call it without the -srgb override switches
texconv -dx10 -f BC3_UNORM_SRGB foo.png
If the foo.png is loaded as an _SRGB format, no conversion takes place and it will store it in the same color space. If it is not in the an _SRGB format -or- there is no equivalent DXGI_FORMAT that explicitly encodes _SRGB (like say a 16bpp PNG that has the
'sRGB' color tag) then you will get a conversion.
Look at the output of the texconv tool to see which format it is loading the foo.png file as...