From bf3911623be49ed94743be2a986764e4f18ff654 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 26 Oct 2020 10:08:58 +0100 Subject: [PATCH] cups/ppd-cache.c: synthetize grayscale if only color is defined --- cups/ppd-cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 5965e382bb..a680ca76d7 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -3790,6 +3790,9 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */ PRINTF_COLOROPTION("RGB", _("Color"), CUPS_CSPACE_SRGB, 8) default_color = "RGB"; + + if (ippGetCount(attr) == 1 || !ippContainsString(attr, "sgray_8") && !ippContainsString(attr, "black_1") && !ippContainsString(attr, "black_8")) + PRINTF_COLOROPTION("Gray", _("GrayScale"), CUPS_CSPACE_SW, 8) } else if (!strcasecmp(keyword, "adobe-rgb_16") || !strcmp(keyword, "ADOBERGB48") || !strcmp(keyword, "ADOBERGB24-48")) { -- 2.47.2