[cups.general] Raster data for Pure black text printing

Michael R Sweet msweet at apple.com
Tue Dec 30 08:58:11 PST 2008


shermin wrote:
> Hi,
>  1)In pstoraster code ,cups_map_rgb() there is a calculation for max K value.What is the use of this max K value and how the cal is done.(k*k*k/mk*mk)

It is a variation of the typical K=min(C,M,Y) that allocates less K
for more saturated colors (min^3/max^2).  When I first came up with
the formula 10+ years ago it provided a better color rendition on the
inkjet and laser printers of the day while not requiring a lot of
extra computation.  I think that still holds today, although now you
usually have to deal with 6 or more colors instead of simple CMYK.

> 2)Code for finding the type of object rendered is in esp ghostscript.or in Ghostscript??I tried searching the code for this for the past 4 days but still couldnt find the hook.

The Ghostscript developer list is your best source for help on this...

> 
> Shermin
> 
>> shermin wrote:
>>> Hi,
>>> One of the RIP used for CUPS is pstoraster right?So if i want to
>>> modify only the cmyk separation in my RIP,do i need to add only a
>>> patch of code for pstoraster as RIP for my device  and whether all
>>> the rest of things will be done by pstoraster???
>> Yes; if you look at the gdevcups.c code, it is responsible for
>> generating the CMYK separation - you could modify the color mapping
>> code to only use K for 100% black (RGB = 0,0,0), and there are other
>> hooks (that the current code does not use) for getting the type of
>> object being rendered.
>>
>> Note, however, that if you replace the system Ghostscript with your
>> own you WILL break things.
>>
>>> 2)How will i bring my RIP in between the pstoraster execution.?
>> You don't, you have to completely replace the pstoraster
>> functionality, either by replacing Ghostscript with your own version
>> or providing a separate copy that implements the color separation
>> behavior you want.
>>
>> .....
>>
>> FWIW, it is probably far easier to just take RGB and map grayscale
>> values to the K channel when adjacent pixels are also grayscale.  This
>> approach would also work on platforms where Ghostscript is not used...
>>
>> --
>> ______________________________________________________________________
>> Michael R Sweet                        Senior Printing System Engineer
>>
> 
> _______________________________________________
> cups mailing list
> cups at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups


-- 
______________________________________________________________________
Michael R Sweet                        Senior Printing System Engineer





More information about the cups mailing list