mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-12-06 07:11:44 +01:00
Code review fix for PNG Auxiliary (#643)
This commit is contained in:
parent
c027648890
commit
232bbf2e39
@ -164,7 +164,7 @@ namespace
|
|||||||
if( png_get_gAMA( st, info, &gamma ) )
|
if( png_get_gAMA( st, info, &gamma ) )
|
||||||
{
|
{
|
||||||
// If gamma == 1.0, then the data is internally linear.
|
// If gamma == 1.0, then the data is internally linear.
|
||||||
if( abs( gamma - 1.0 ) > 1e6 )
|
if( abs( gamma - 1.0 ) > 1e-6 )
|
||||||
png_set_gamma( st, screen_gamma, gamma );
|
png_set_gamma( st, screen_gamma, gamma );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -216,7 +216,7 @@ namespace
|
|||||||
if( png_get_gAMA( st, info, &gamma ) )
|
if( png_get_gAMA( st, info, &gamma ) )
|
||||||
{
|
{
|
||||||
// This PNG is explicitly linear.
|
// This PNG is explicitly linear.
|
||||||
if( abs( gamma - 1.0 ) <= 1e6 )
|
if( abs( gamma - 1.0 ) <= 1e-6 )
|
||||||
return linear;
|
return linear;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user