[cups.general] How to print image in DeviceN space?

John Labovitz johnl at johnlabovitz.com
Mon Apr 18 11:50:22 PDT 2011


I am building some software to print grayscale images using multiple shades of gray ink, each of which is loaded into one of the standard positions on an inkjet.  (Yes, I know about QuadtoneRIP; my approach is somewhat different.)  I have code that characterizes inks, generates separation curves, and separates a grayscale image into multiple channels, according to density.  But that process assumes I can get "raw" data to a particular channel on the printer.

What I'm stuck on is how exactly to get that data to CUPS so it will not be filtered through the usual adjustments and internal conversions and separations.  It seems that the DeviceN colorspace is a big part of this, but I'm still fuzzy on how this works.

In looking at the CUPS documentation & code, I can see a few ways of doing this:

	1. Send a multi-channel TIFF file (ordered by inks as specified in the PPD file) into CUPS using some magic options that select a DeviceN colorspace.  I haven't tried this, but I don't see any evidence that it would actually work.

	2. Using the CUPS raster API, generate my own raster data from the TIFF file, using 8 or 16 bits per color and outputting the pixels pretty much as found in my separations file (ordered one of the cupsColorOrder values).  However, it appears from looking at 'imagetoraster' that dithering to 1- or 2-bit data is required?

	3. Generate raster data as in #2, but resize/dither it myself, probably using ImageMagick.  This is my least favored method, as it's quite CPU-intensive, and I might rather have access to the dithering algorithms in the drivers (say, Gutenprint).

Am I at all on the right track?

I'm running OS X 10.6, with the stock CUPS, although I'm happy to build & install later versions.  The printers I'm working with are the Epson R2400, 4000, and 7500, with either the stock Epson drivers or the Gutenprint drivers.

Thanks,
--John




More information about the cups mailing list