Interested in writing a cups driver...
Collin Day
dcday137 at gmail.com
Fri Sep 5 09:32:21 PDT 2008
> Collin Day wrote:
> > Hello all,
> >
> > I own an HP Photosmart Pro b8850. I am using it to print photos. I
> > know that there are PPD's and drivers out there that work with this
> > printer, but none seem to have everything that I want. For example,
> > the HPLIP does not yet support using just the gray inks for photos
> > (but they are working on it) and they have no plans to support 16 bit
> > images - everything has to be moved to 8 bit. I prefer to edit and
> > do work in 16 bits. After a little research, it seems cups would
> > support a 16bit/channel input (I think - please correct if I am
> > mistaken).
>
> CUPS does support 16-bits/channel, although there are specific raster
> filters that currently do not support a "clean" 16-bit path in the
> open source world. Ghostscript is one - it is limited to 15-bits/
> channel internally - and imagetoraster currently maps from 8-bits to
> 16...
>
> > ...
> > Q1. HP says that the printer uses PCL3 GUI, but a lot of the drivers
> > I see indicate PS driver types. Should I try to use PCL or is PS the
> > preferred method? Does anyone know the advantages and disadvantages
> > - all I can read right now is that PS is good for mainly vector
> > images while raster is the way to go if you are interested in
> > printing photos (that would be me).
>
> OK, a couple things. First, PCL3GUI is actually a low-level raster
> version of PCL3 that provides access to the printer-specific bit depths,
> resolutions, and color channels.
>
> Second, PS (PostScript) is a high-level page description language that
> supports both vector and raster graphics. In CUPS, PostScript is
> typically converted to CUPS raster data (application/vnd.cups-raster)
> by Ghostscript or the corresponding filters on Mac OS X. Older
> drivers use similar interfaces (like HP's old IJS interface with
> Ghostscript) to get raster data.
>
> So, for this printer you want to write a PCL3GUI driver filter that
> reads CUPS raster data. You will also provide a PPD file (which can
> be generated using the CUPS DDK tools - I highly recommend using them!)
> that tells CUPS to send raster data to your filter and what settings
> to use when generating the raster data ("I want 16-bit Gray at 1200dpi",
> etc.)
>
> > Q2. I can't seem to figure out how/where you would tell the printer
> > to use only certain inks - I see RGB and CMYK mentioned a lot, as
> > well as ICC profiles for different numbers of inks. Just for simple
> > purposes, does anyone know approximatley hoew you would go about
> > printing a B/W photo with just gray inks so that you are not using
> > any of the CMY colors?
>
> That depends a lot on the printer. If you can figure out the channel
> mapping used by your printer, you can dither from the input grayscale
> to the inks in the printer. Fortunately, calibrating gray inks is
> simpler than full color, so you mainly need to measure the relative
> darkness of each ink and drop size, and then use that to build a
> dither lookup table. The tricky part will be adjusting the darkness
> values for ink density/bleed - for example, if 100% pure black bleeds
> through the paper, you may find doing an 80% dot pattern is sufficient
> to achieve the same darkness without bleed-through. In that case,
> you'd multiply the darkness of pure black by 1.25 (100/80 == 1.25)
> so that an input grayscale of 100% black would only ever use a
> maximum of 80% of pure black ink.
>
> The CUPS DDK contains suitable dither code; currently it is optimized
> for dithering 8-bit color data with an internal resolution of 12-bits
> (to track fractional errors). It could be easily adapted to 16-bit
> input.
>
> As you dither each input pixel you'll end up with a specific ink and
> dot size to use, which can then be added to the corresponding color
> channel band (most PCL3GUI modes send color channels in 1-bit rows,
> even for 2-bit-per-color inks). Again, the CUPS DDK's PCL driver
> shows how to do this... :)
>
> --
> ______________________________________________________________________
> Michael R Sweet Senior Printing System Engineer
>
Thank you for the detailed reply. Looks like I have some experimenting to do, but first I should try to absorb the DDK a little more. I was looking at it last night trying to us the ppd importer with some of the already made PPDs for other printers to see if I could get a feel for how different things worked. If you don't mind, I'd like to recap and make sure I am understanding exactly what you are telling me:
1. I need to create a PCL3GUI driver filter, which will read the cups raster data -> i.e. CUPS would take my 16bit/channel yuck.tif and run it through this filter which would convert it to PCL3GUI data and then send it to the printer. One question - is the PPD the driver as well? I know that all of the settings / printer capabilities go in the PPD, but is the PCL3GUI filter an entirely separate entity?
2. I need to figure out the channel mappings to the printer and then create mappings for different media types (plain paper, glossy, etc.) I suppose these could be profiled (that is getting ahead of myself - I should probably just get something working first). I should examine the DDK further to figure out how to do this - but most of the info is in section 6 talking about raster color management.
I hope I have most of this right - it will probably take some time before I get anything working, but it is kind of neat to learn about all this stuff.
Thanks very much again.
-C
More information about the cups
mailing list