Lines Matching defs:xyz
29 // inter PCS conversions XYZ <-> CIE L* a* b*
69 CIE XYZ X 0 -> 1.99997 0x0000 -> 0xffff
70 CIE XYZ Y 0 -> 1.99997 0x0000 -> 0xffff
71 CIE XYZ Z 0 -> 1.99997 0x0000 -> 0xffff
133 // Standard XYZ to Lab. it can handle negative XZY numbers in some cases
134 void CMSEXPORT cmsXYZ2Lab(const cmsCIEXYZ* WhitePoint, cmsCIELab* Lab, const cmsCIEXYZ* xyz)
141 fx = f(xyz->X / WhitePoint->X);
142 fy = f(xyz->Y / WhitePoint->Y);
143 fz = f(xyz->Z / WhitePoint->Z);
151 // Standard XYZ to Lab. It can return negative XYZ in some cases
152 void CMSEXPORT cmsLab2XYZ(const cmsCIEXYZ* WhitePoint, cmsCIEXYZ* xyz, const cmsCIELab* Lab)
163 xyz -> X = f_1(x) * WhitePoint -> X;
164 xyz -> Y = f_1(y) * WhitePoint -> Y;
165 xyz -> Z = f_1(z) * WhitePoint -> Z;
358 // In XYZ All 3 components are encoded using 1.15 fixed point
365 void CMSEXPORT cmsFloat2XYZEncoded(cmsUInt16Number XYZ[3], const cmsCIEXYZ* fXYZ)
367 cmsCIEXYZ xyz;
369 xyz.X = fXYZ -> X;
370 xyz.Y = fXYZ -> Y;
371 xyz.Z = fXYZ -> Z;
374 if (xyz.Y <= 0) {
376 xyz.X = 0;
377 xyz.Y = 0;
378 xyz.Z = 0;
381 if (xyz.X > MAX_ENCODEABLE_XYZ)
382 xyz.X = MAX_ENCODEABLE_XYZ;
384 if (xyz.X < 0)
385 xyz.X = 0;
387 if (xyz.Y > MAX_ENCODEABLE_XYZ)
388 xyz.Y = MAX_ENCODEABLE_XYZ;
390 if (xyz.Y < 0)
391 xyz.Y = 0;
393 if (xyz.Z > MAX_ENCODEABLE_XYZ)
394 xyz.Z = MAX_ENCODEABLE_XYZ;
396 if (xyz.Z < 0)
397 xyz.Z = 0;
400 XYZ[0] = XYZ2Fix(xyz.X);
401 XYZ[1] = XYZ2Fix(xyz.Y);
402 XYZ[2] = XYZ2Fix(xyz.Z);
420 void CMSEXPORT cmsXYZEncoded2Float(cmsCIEXYZ* fXYZ, const cmsUInt16Number XYZ[3])
422 fXYZ -> X = XYZ2float(XYZ[0]);
423 fXYZ -> Y = XYZ2float(XYZ[1]);
424 fXYZ -> Z = XYZ2float(XYZ[2]);