[gs-devel] PDF rasterization for driverless printing: Color Management
Till Kamppeter
till.kamppeter at gmail.com
Mon May 10 17:03:36 UTC 2021
Hi,
I am currently working on how to cope with extended color options for
higher print quality on driverless IPP printers.
The discussion so far is here (Thread: Make use of extended color spaces
on IPP printers):
https://lists.linuxfoundation.org/pipermail/printing-architecture/2021/thread.html
https://lists.linuxfoundation.org/pipermail/printing-architecture/2021/003997.html
I have found a solution to make use of optional 16 bit per color
(instead of 8 bit per color) on some printers.
My problem is that there are printers which not only offer the standard
sRGB but also offer AdobeRGB and DeviceRGB. At least with AdobeRGB one
can get a higher color gammut, Device RGB allows to use a
printer-specific ICC profile (loaded from printer following URI in
"printer-icc-profiles" printer IPP attribute or obtained by
self-calibrating).
What should happen here to have the best driverless printing experience
for uses is the following:
- The user should only choose between auto, grayscale, and color for
color mode, he should not manually choose sRGB, AdobeRGB, DeviceRGB,
... This should be selected automatically.
- If an incoming PDF file is sRGB, it should be rasterized to an sRGB
Raster file and sent to the printer
- If an incoming PDF is AdobeRGB and the printer supports AdobeRGB, it
should be rasterized in AdobeRGB
- If the printer supports DeviceRGB and the printer's ICC profile is
available, output (at least if the original was sRGB) should be
converted to DeviceRGB with the printer's IPP profile.
- The client has access to the CUPS queue's printer IPP attributes and
so also to the printer's color space support info, so a client
application could already send the data in the desired color space but
does not necessarily do it.
If the incoming print job is PDF, the rasterization is done by
Ghostscript, called via the gstoraster CUPS filter (or the ghostscript()
filter function of cups-filters 2.x) with a command line like (producing
PWG Raster):
gs -dQUIET -dSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS
-dShowAcroForm -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups
-sMediaClass=PwgRaster -sOutputType=Automatic -r600x600
-dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -dcupsBitsPerColor=8
-dcupsColorOrder=0 -dcupsColorSpace=19
-dcupsBorderlessScalingFactor=0.0000 -dcupsInteger1=1 -dcupsInteger2=1
-scupsPageSizeName=na_letter_8.5x11in -I/usr/share/cups/fonts -c -f -_
The cupsColorSpace is
18: sGray
19: sRGB
20: AdobeRGB
1: DeviceRGB
3: DeviceGray
Now my questions are
- Does this command line convert the input to the destination color
space (the cupsColorSpace value)? So that if I set cupsColorSpace=20
that I always get AdobeRGB output? Or do I need any additional command
line arguments?
- If I opt for DeviceRGB (cupsColorSpace=1) or DeviceGray
(cupsColorSpace=3) how do I supply the ICC profile (which I have in a
file) to the Ghostscript call so that the output is in this color
space? Which command line options do I need to add?
- If I print a photo from a user application and the application sends
it as PDF but in AdobeRGB would the above command line (with
cupsColorSpace=20) conserve the AdobeRGB and not do any inbetween
conversion to sRGB or anything else?
Any help is appreciated
Till
More information about the gs-devel
mailing list