Added support for linear color space PNG writing (#48)
This commit is contained in:
Родитель
0eab1e7f83
Коммит
211d960034
|
@ -599,6 +599,17 @@ namespace
|
|||
value.bVal = 0;
|
||||
(void)metawriter->SetMetadataByName(L"/sRGB/RenderingIntent", &value);
|
||||
}
|
||||
// linear space.
|
||||
else
|
||||
{
|
||||
// add gAMA chunk with gamma 1.0
|
||||
value.vt = VT_UI4;
|
||||
value.uintVal = 100000; // gama value * 100,000 -- i.e. gamma 1.0
|
||||
(void)metawriter->SetMetadataByName( L"/gAMA/ImageGamma", &value );
|
||||
|
||||
// remove sRGB chunk which is added by default.
|
||||
(void)metawriter->RemoveMetadataByName(L"/sRGB/RenderingIntent");
|
||||
}
|
||||
}
|
||||
#if defined(_XBOX_ONE) && defined(_TITLE)
|
||||
else if (memcmp(&containerFormat, &GUID_ContainerFormatJpeg, sizeof(GUID)) == 0)
|
||||
|
|
Загрузка…
Ссылка в новой задаче