[cups.development] filter: grayscale or color
Jan Engelhardt
jengelh at linux01.gwdg.de
Sat Nov 18 09:36:19 PST 2006
On Nov 18 2006 08:22, Michael Sweet wrote:
>Jan Engelhardt wrote:
>>
>> is there a way for a filter to find out whether the end result that is
>> going to be sent to the backend will be grayscale or color?
>> ...
>
>The Adobe ColorModel option and ColorDevice attribute can be used,
>however Foomatic drivers don't follow the standard and use other
>other option names.
I am sure they follow, at least the one I randomly picked,
2500c-pcl3.ppd.gz:
*FoomaticRIPOptionSetting ColorMode=CMY: " -sColorModel=CMY"
*FoomaticRIPOptionSetting ColorMode=CMY+K: " -sColorModel=CMY+K"
*FoomaticRIPOptionSetting ColorMode=CMYK: " -sColorModel=CMYK"
*FoomaticRIPOptionSetting ColorMode=Gray: " -sColorModel=Gray"
...
*DefaultColorMode: Gray
The difference to the same instance with another default color is
16:20 ichi:/etc/cups/ppd # diff -dpru nullgray.ppd nullcmypk.ppd
--- nullgray.ppd 2006-11-18 13:27:29.457045175 +0100
+++ nullcmypk.ppd 2006-11-18 13:27:36.677045176 +0100
@@ -204,7 +204,7 @@ USE -sDEVICE=pcl3%A%Z -sOutputFile=- -"
*OpenUI *ColorMode/Color Mode: PickOne
*FoomaticRIPOption ColorMode: enum CmdLine A
*OrderDependency: 110 AnySetup *ColorMode
-*DefaultColorMode: Gray
+*DefaultColorMode: CMY+K
*ColorMode CMY/CMY: "%% FoomaticRIPOptionSetting: ColorMode=CMY"
*FoomaticRIPOptionSetting ColorMode=CMY: " -sColorModel=CMY"
*ColorMode CMY+K/CMY+K: "%% FoomaticRIPOptionSetting: ColorMode=CMY+K"
Which is where I would set my grep on.
>You're probably better off defining a list of options and choices that
>override the default color mode of a printer
This is just an accounting filter, not a modifying filter. In its
simplest form, it is just a pipe to the next filter.
>, e.g. default to the
>ColorDevice true/false value and then update the color state based on
>option selections.
-`J'
--
More information about the cups-devel
mailing list