This commit is contained in:
@@ -941,12 +941,12 @@ void Color::rgbxyz (float r, float g, float b, float &x, float &y, float &z, con
|
||||
z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ;
|
||||
}
|
||||
|
||||
void Color::rgbxyY(float r, float g, float b, float &x, float &y, float &Y, float &xx, float &yy, float &zz, const double xyz_rgb[3][3])
|
||||
void Color::rgbxyY(float r, float g, float b, float &x, float &y, float &Y, const float xyz_rgb[3][3])
|
||||
{
|
||||
xx = ((xyz_rgb[0][0] * r + xyz_rgb[0][1] * g + xyz_rgb[0][2] * b)) ;
|
||||
yy = ((xyz_rgb[1][0] * r + xyz_rgb[1][1] * g + xyz_rgb[1][2] * b)) ;
|
||||
zz = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ;
|
||||
float som = xx + yy + zz;
|
||||
const float xx = xyz_rgb[0][0] * r + xyz_rgb[0][1] * g + xyz_rgb[0][2] * b;
|
||||
const float yy = xyz_rgb[1][0] * r + xyz_rgb[1][1] * g + xyz_rgb[1][2] * b;
|
||||
const float zz = xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b;
|
||||
const float som = xx + yy + zz;
|
||||
x = xx / som;
|
||||
y = yy / som;
|
||||
Y = yy / 65535.f;
|
||||
|
||||
Reference in New Issue
Block a user