Added WIC_LOADER_SRGB_DEFAULT flag to WICTextureLoader

This commit is contained in:
Chuck Walbourn
2020-06-01 19:00:09 -07:00
parent 17aeb40917
commit 2873a800d0
6 changed files with 27 additions and 9 deletions

View File

@@ -534,11 +534,19 @@ namespace
{
sRGB = (value.uintVal == 45455);
}
else
{
sRGB = (loadFlags & WIC_LOADER_SRGB_DEFAULT) != 0;
}
}
else if (SUCCEEDED(metareader->GetMetadataByName(L"System.Image.ColorSpace", &value)) && value.vt == VT_UI2)
{
sRGB = (value.uiVal == 1);
}
else
{
sRGB = (loadFlags & WIC_LOADER_SRGB_DEFAULT) != 0;
}
(void)PropVariantClear(&value);