mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
better white point calculation, but still questionable
This commit is contained in:
parent
2c46984ed1
commit
ce4671c14c
|
@ -570,13 +570,14 @@ cms_profile_getattr_product_info(CmsProfileObject* self, void* closure)
|
||||||
_info_concat(&ret, description);
|
_info_concat(&ret, description);
|
||||||
_info_concat(&ret, copyright);
|
_info_concat(&ret, copyright);
|
||||||
|
|
||||||
#define K007 (icTagSignature)0x4B303037
|
|
||||||
if (cmsIsTag(self->profile, cmsSigMediaWhitePointTag)){
|
if (cmsIsTag(self->profile, cmsSigMediaWhitePointTag)){
|
||||||
cmsCIExyY *WhitePt;
|
cmsCIEXYZ *WhitePt;
|
||||||
|
cmsCIExyY xyyWhitePt;
|
||||||
cmsFloat64Number tempK;
|
cmsFloat64Number tempK;
|
||||||
|
|
||||||
WhitePt = (cmsCIExyY *) cmsReadTag(self->profile, cmsSigMediaWhitePointTag);
|
WhitePt = (cmsCIEXYZ *) cmsReadTag(self->profile, cmsSigMediaWhitePointTag);
|
||||||
if (cmsTempFromWhitePoint(&tempK, WhitePt)){
|
cmsXYZ2xyY(&xyyWhitePt, WhitePt);
|
||||||
|
if (cmsTempFromWhitePoint(&tempK, &xyyWhitePt)){
|
||||||
char tempstr[10];
|
char tempstr[10];
|
||||||
snprintf(tempstr, 10, "%5.0f", tempK);
|
snprintf(tempstr, 10, "%5.0f", tempK);
|
||||||
_info_concat(&ret, PyString_FromFormat("White Point: %sK", tempstr));
|
_info_concat(&ret, PyString_FromFormat("White Point: %sK", tempstr));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user