in cpp/AdvancedColorImages/AdvancedColorImages/DirectXTileRenderer.cpp [520:546]
void DirectXTileRenderer::PopulateImageInfoACKind(_Inout_ ImageInfo* info)
{
if (info->bitsPerPixel == 0 ||
info->bitsPerChannel == 0 ||
info->size.Width == 0 ||
info->size.Height == 0)
{
check_hresult(E_INVALIDARG);
}
info->imageKind = AdvancedColorKind::StandardDynamicRange;
// Bit depth > 8bpc or color gamut > sRGB signifies a WCG image.
// The presence of a color profile is used as an approximation for wide gamut.
if (info->bitsPerChannel > 8 || info->numProfiles >= 1)
{
info->imageKind = AdvancedColorKind::WideColorGamut;
}
// This application currently only natively supports HDR images with floating point.
// An image encoded using the HDR10 colorspace is also HDR, but this
// is not automatically detected by the application.
if (info->isFloat == true)
{
info->imageKind = AdvancedColorKind::HighDynamicRange;
}
}