uint8_t* argb
)
{
- int const max_colour = pow (2, 12) - 1;
+ int const max_colour = pow (2, 16) - 1;
struct {
double x, y, z;
};
int const height = xyz_image->size().height;
- int const width = xyz_image->size().height;
+ int const width = xyz_image->size().width;
for (int y = 0; y < height; ++y) {
uint16_t* rgb_line = reinterpret_cast<uint16_t*> (rgb + y * stride);
d.z = min (65535.0, d.z);
/* Out gamma LUT */
- *xyz_x++ = lut_out[lrint(d.x)] * 4095;
- *xyz_y++ = lut_out[lrint(d.y)] * 4095;
- *xyz_z++ = lut_out[lrint(d.z)] * 4095;
+ *xyz_x++ = lrint (lut_out[lrint(d.x)] * 4095);
+ *xyz_y++ = lrint (lut_out[lrint(d.y)] * 4095);
+ *xyz_z++ = lrint (lut_out[lrint(d.z)] * 4095);
}
}