wayland/xx colormanagement: don't clamp primaries to 1

The range of values is [0, 10'000], clamping to 1 just makes all primaries 1
This commit is contained in:
Xaver Hugl 2024-08-14 01:32:02 +02:00
parent 94b2c5e50e
commit 4fc6a5bd51

View file

@ -381,7 +381,7 @@ void XXImageDescriptionV4::xx_image_description_v4_get_information(Resource *qtR
auto resource = wl_resource_create(qtResource->client(), &xx_image_description_info_v4_interface, qtResource->version(), information);
const auto c = m_description.containerColorimetry();
const auto round = [](float f) {
return std::clamp(std::round(f * 10'000.0), 0.0, 1.0);
return std::clamp(std::round(f * 10'000.0), 0.0, 10'000.0);
};
xx_image_description_info_v4_send_primaries(resource,
round(c.red().x()), round(c.red().y()),