]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libcupsfilters: PCLm support in cupsRasterPrepareHeader() also without PPD
authorTill Kamppeter <till.kamppeter@gmail.com>
Mon, 27 Dec 2021 22:18:56 +0000 (19:18 -0300)
committerTill Kamppeter <till.kamppeter@gmail.com>
Mon, 27 Dec 2021 22:18:56 +0000 (19:18 -0300)
Also let the cupsRasterPrepareHeader() function output correct PCLm
when we do not have a PPD file.

cupsfilters/raster.c

index 6018d5800021031eeee250164ea811f0be31edd4..641afd8d334b027b40df6d5f6fe769eb927efcac 100644 (file)
@@ -792,6 +792,18 @@ cupsRasterPrepareHeader(cups_page_header2_t *h, /* I  - Raster header */
       res = cupsRasterSetColorSpace(h, cspaces_available, color_mode,
                                    cspace, &hi_depth);
     }
+    else if (pclm)
+    {
+      /* Color space is always SRGB 8 */
+      cspaces_available = "srgb_8";
+      color_mode = "auto";
+      hi_depth = 0;
+      if (log)
+       log(ld, FILTER_LOGLEVEL_DEBUG,
+           "For PCLm color mode is always SRGB 8-bit.");
+      res = cupsRasterSetColorSpace(h, cspaces_available, color_mode,
+                                   cspace, &hi_depth);
+    }
   }
 
   if (res != 1) {