Commit 0b6f52a8 authored by Mathias Wein's avatar Mathias Wein

Substitute Rec. 2100 PQ profile with linear Rec. 2020 profile

Perceptual quantization (PQ) is just not useful for a
color selector.

(cherry picked from commit 1e87724bb676357c79ecf82860cd09f61df4bec2)
parent 0c2489c6
......@@ -107,9 +107,19 @@ void KisVisualColorSelector::slotSetColor(const KoColor &c)
void KisVisualColorSelector::slotSetColorSpace(const KoColorSpace *cs)
{
if (m_d->currentCS != cs) {
m_d->currentCS = cs;
m_d->currentcolor = KoColor(cs);
if (!m_d->currentCS || *m_d->currentCS != *cs) {
const KoColorSpace *csNew = cs;
// PQ color space is not very suitable for color picking, substitute with linear one
if (cs->colorModelId() == RGBAColorModelID &&
cs->profile()->uniqueId() == KoColorSpaceRegistry::instance()->p2020PQProfile()->uniqueId()) {
csNew = KoColorSpaceRegistry::instance()->
colorSpace(RGBAColorModelID.id(), Float32BitsColorDepthID.id(),
KoColorSpaceRegistry::instance()->p2020G10Profile());
}
m_d->currentCS = csNew;
m_d->currentcolor = KoColor(csNew);
slotRebuildSelectors();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment