Raster file generation

Nathan Whitehorn nathanw at uchicago.edu
Fri Feb 9 16:11:52 PST 2007


> Nathan Whitehorn wrote:
> > ...
> >> You're generating 32-bit KCMY data, but the rastertohp filter only
> >> handles 4-bit KCMY data.
> >
> > Is there any way to determine the desired bit depth? I'm also not
> > sure if there's a recommended way to convert to 4-bit KCMY (should I
> > just round myself, or is there a utility function for doing this kind
> > of thing?).
>  > ...
>
> The bit depth is passed via the cupsBitsPerColor page attribute;
> if you use one of the standard PPDs included with CUPS along with
> cupsRasterInterpretPPD(), the page header will show a cupsBitsPerColor
> value of 1.

Thanks -- that's fixed (I hate bit arithmetic). Is there any reason rastertohp supports only such a restricted color space? PCL itself supports 24-bit color, I believe.

> As for dithering, there are no recommended algorithms but using
> either a simple ordered dither (like imagetoraster does) or a
> Floyd-Steinburg error-diffusion dither (like Apple's cg*toraster
> filters do) will be sufficient for most devices.

Thanks, I'll put in an algorithm for this soon.
-Nathan




More information about the cups-devel mailing list