-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raster_base_header(): Several fixes on color space selection
Fixes #38 The internal (static) funcrion raster_base_header() creates a CUPS or PWG Raster header from scratch, without using data of a PPD file by means of Raster header derived from the PPD. It solely uses IPP attributes or command line options. It distinguishes between CUPS Raster and PWG/Apple Raster headers. There were several bugs in selecting the correct color space and depth settings: - For PWG-Raster all attributes and options got ignored and standard 8-bit sRGB set. - Without any valid color space/depth setting attribute or "auto" always standard 8-bit sRGB got set as the default, regardless whether the printer is actually a color printer. - Color spaces for printing in color could be set on monochrome printers by options or atrributes. - Color spaces not valid on PWG Raster could be set on PWG Raster. - DeviceN modes could only be set by specifying a depth, like "Device4_8" not just "Device4". Now we use 8-bit SGray as default for monochrome printers and 8-bit RGB for color printers. We use the printer IPP attribute "color-supported" to check whether the printer is color. IPP ttributes or command line options setting a color mode on a monochrome printer are ignored now, also, if the output format is PWG Raster, setting a color space not supported by PWG Raster is ignored. Now for monochrome AirPrint (Apple Raster) printers, the Raster data sent should be actually monochrome (grayscale) and not color.
- Loading branch information
1 parent
26f9c3f
commit c6175a2
Showing
1 changed file
with
61 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters