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:
parent
94b2c5e50e
commit
4fc6a5bd51
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
auto resource = wl_resource_create(qtResource->client(), &xx_image_description_info_v4_interface, qtResource->version(), information);
|
||||||
const auto c = m_description.containerColorimetry();
|
const auto c = m_description.containerColorimetry();
|
||||||
const auto round = [](float f) {
|
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,
|
xx_image_description_info_v4_send_primaries(resource,
|
||||||
round(c.red().x()), round(c.red().y()),
|
round(c.red().x()), round(c.red().y()),
|
||||||
|
|
Loading…
Reference in a new issue