OpenPrinting / libcupsfilters

Apache License 2.0
5 stars 22 forks source link

raster.c: Fix color printing for raster formats #39

Closed zdohnal closed 10 months ago

zdohnal commented 10 months ago

We didn't check whether the device is GrayScale only and set the raster header as color device unless options or job attributes contain monochrome settings.

After the fix, this happen only if color-supported is true, otherwise grayscal color space is set.

Fixes #38

tillkamppeter commented 10 months ago

This patch is not correct. It checks if the printer is monochrome and in that case it simply sets 8-bit sGray as color space, regardless of any attributes or command line options which could ask for other monochrome color spaces, like bi-level or 16-bit sGray.

There were several bugs in the code to select the color space and I have fixed them with c6175a2f

Closing this pull request ...

tillkamppeter commented 10 months ago

But thanks anyway, for it, and especially for pointing out that the bug was at this place ...