From: Øyvind Kolås Date: Sat, 23 Jan 2021 16:00:21 +0000 (+0100) Subject: babl: support creating babl spaces from input-class ICC profiles X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~6^2~12 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=71f0b821ed6a5967449b6bf9d9b41a3a5d757559;p=babl.git babl: support creating babl spaces from input-class ICC profiles --- diff --git a/babl/babl-icc.c b/babl/babl-icc.c index a032746..b5e4269 100644 --- a/babl/babl-icc.c +++ b/babl/babl-icc.c @@ -1008,19 +1008,19 @@ babl_space_from_icc (const char *icc_data, return ret; } - if (strcmp (color_space.str, "RGB ") - && strcmp (color_space.str, "GRAY") - ) + if (!(!strcmp (color_space.str, "RGB ")|| + !strcmp (color_space.str, "GRAY"))) { *error = "not defining RGB, CMYK or GRAY space.."; } else - { - if (strcmp (profile_class.str, "mntr")) - *error = "not a monitor-class profile"; - if (!strcmp (color_space.str, "GRAY")) - is_gray = 1; - } + { + if (!(!strcmp (profile_class.str, "mntr")|| + !strcmp (profile_class.str, "scnr"))) + *error = "not a display or input-class profile"; + if (!strcmp (color_space.str, "GRAY")) + is_gray = 1; + } } if (!*error)