From 71f0b821ed6a5967449b6bf9d9b41a3a5d757559 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Sat, 23 Jan 2021 17:00:21 +0100 Subject: [PATCH] babl: support creating babl spaces from input-class ICC profiles --- babl/babl-icc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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) -- 2.30.2