SRGB support

May 20, 2013 at 9:08 AM
Hello,

I'm playing with texconv and can't figure out how the srgbi/srgbo/srgbe options works.
I tried to convert from an R8G8B8A8 png file to a BC1_UNORM_SRGB DDS. In this case, mipmap generation should be done with gamma correction. But the srgb options seems to have no effect.

I've also tested to convert the same file to BC1_UNORM using -srgbi indicating that the orignal image is in SRGB space, and should be de-gamma before mipmap generation and compression. Once again the option seems to have no effect.

I took a look to the texconv source code, and it seems that srgb options are only used in the convert stage (ligne 819), and since my output format is compressed, the code is never called.

Am I missing something, or srgb support is not working ?

Chris
Coordinator
May 20, 2013 at 8:44 PM
The sRGB options currently just do SRGB color space conversion for Convert. This was previously not working correctly in all cases due to WIC not handling colorspace quite right.

The library is currently using WIC to do mipmap generation and resizing, which does not do "gamma correct" filtering. I have an open work item to write my own custom filters which will be "gamma correct".

See comments in Codeplex work item 641
Coordinator
May 20, 2013 at 9:16 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Jun 15, 2013 at 7:18 PM
This has been fixed for the June 2013 release
Marked as answer by walbourn on 1/23/2014 at 11:22 PM
Sep 10, 2013 at 8:33 AM
Ok, It works ! Thank you.