gegl-utils: extend gegl_babl_variant with CMYK based spaces

The CMYK spaces only exist in one TRC variant, most math in GEGL is assuming
operation on additive like spaces - thus the premultiplied/non-premultiplied
versions returned for CMYK models is the lower-case thus inverted versions
of encodings.
parent c8af2ff1
......@@ -66,6 +66,15 @@ static const Babl *gegl_babl_format_linear_float (const Babl *format)
{
format = babl_format_with_space ("YA float", space);
}
else if (babl_model_is (model, "cmyk") ||
babl_model_is (model, "cmykA") ||
babl_model_is (model, "camayakaA") ||
babl_model_is (model, "CMYK") ||
babl_model_is (model, "CMYKA") ||
babl_model_is (model, "CaMaYaKaA"))
{
format = babl_format_with_space ("cmykA float", space);
}
else if (babl_model_is (model, "RGB") ||
babl_model_is (model, "R'G'B'") ||
babl_model_is (model, "R~G~B~"))
......@@ -114,6 +123,15 @@ static const Babl *gegl_babl_format_perceptual_float (const Babl *format)
{
format = babl_format_with_space ("Y~A float", space);
}
else if (babl_model_is (model, "cmyk") ||
babl_model_is (model, "cmykA") ||
babl_model_is (model, "camayakaA") ||
babl_model_is (model, "CMYK") ||
babl_model_is (model, "CMYKA") ||
babl_model_is (model, "CaMaYaKaA"))
{
format = babl_format_with_space ("cmykA float", space);
}
else if (babl_model_is (model, "RGB") ||
babl_model_is (model, "R'G'B'") ||
babl_model_is (model, "R~G~B~"))
......@@ -162,6 +180,15 @@ static const Babl *gegl_babl_format_nonlinear_float (const Babl *format)
{
format = babl_format_with_space ("Y'A float", space);
}
else if (babl_model_is (model, "cmyk") ||
babl_model_is (model, "cmykA") ||
babl_model_is (model, "camayakaA") ||
babl_model_is (model, "CMYK") ||
babl_model_is (model, "CMYKA") ||
babl_model_is (model, "CaMaYaKaA"))
{
format = babl_format_with_space ("cmykA float", space);
}
else if (babl_model_is (model, "RGB") ||
babl_model_is (model, "R'G'B'") ||
babl_model_is (model, "R~G~B~"))
......@@ -207,6 +234,15 @@ static const Babl *gegl_babl_format_premultiplied_linear_float (const Babl *form
{
format = babl_format_with_space ("YaA float", space);
}
else if (babl_model_is (model, "cmyk") ||
babl_model_is (model, "cmykA") ||
babl_model_is (model, "camayakaA") ||
babl_model_is (model, "CMYK") ||
babl_model_is (model, "CMYKA") ||
babl_model_is (model, "CaMaYaKaA"))
{
format = babl_format_with_space ("camayakaA float", space);
}
#if 0 // just treat as else
else if (babl_model_is (model, "RGB") ||
babl_model_is (model, "R'G'B'") ||
......@@ -250,6 +286,15 @@ static const Babl *gegl_babl_format_premultiplied_perceptual_float (const Babl *
{
format = babl_format_with_space ("Y~aA float", space);
}
else if (babl_model_is (model, "cmyk") ||
babl_model_is (model, "cmykA") ||
babl_model_is (model, "camayakaA") ||
babl_model_is (model, "CMYK") ||
babl_model_is (model, "CMYKA") ||
babl_model_is (model, "CaMaYaKaA"))
{
format = babl_format_with_space ("camayakaA float", space);
}
#if 0 // just treat as else
else if (babl_model_is (model, "RGB") ||
babl_model_is (model, "R'G'B'") ||
......
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