Help! What's matter with my raster data?

Michael Sweet mike at easysw.com
Wed Aug 16 08:41:42 PDT 2006


Horky Chen wrote:
>> Horky Chen wrote:
>>> Dear all,
>>>    I write one filter to package the raster data to our format. I use the CMYK color space, and color order is Chunked. When print one cyan color image,but the result I get via cupsRasterReadPixels cannot match the source data. For example, the color of my image is:
>>>   C:0   M:79  Y:0  K:0, but I get from the Raster data, it be:
>>>   C:34  M:67  Y:0  K:0!  That's why? Why I cannot get the real image data from CUPS Raster data?
>> It is impossible to help you without more information.
>>
>> What operating system?
>>
>> What version of CUPS?
>>
>> What program are you using to produce the raster data used by your
>> filter?
>>
>> --
>> ______________________________________________________________________
>> Michael Sweet, Easy Software Products           mike at easysw dot com
>> Internet Printing and Document Software          http://www.easysw.com
> 
> Dear Michael,
> 
> Thanks for your quickly reply!
> 
> I wrote the filter in Mac OS 10.4.7 and default CUPS enviroment. The source image is a TIFF file with Utagged CMYK profile and I print it with Photoshop 7.0. I have turned off the color management in Color Setting.
> 
> How to get the real raster data?

OK, so there are several things happening that will prevent it from
working the way you expect.

First, Photoshop (unfortunately) uses the pre-MacOS X print APIs
which produce PICT files with embedded PostScript.  These are
converted to PostScript using Apple's pictwpstops filter, then
converted to PDF using Apple's pstopdffilter filter, and finally
to CMYK raster data using Apple's cgpdftoraster filter.

Second, IIRC the pstopdffilter will convert process your CMYK color
data to a RGB colorspace, either the Generic RGB colorspace or your
monitor's colorspace, depending on your colorsync settings.  The
data is then converted back to CMYK by cgpdftoraster on the other
end, either using Generic CMYK or a colorspace specified via the
cupsICCProfile attribute in your driver's PPD file.

Ultimately this means that you won't get raw CMYK data to your
filter by printing from Photoshop.

Apple also supplies an image filter (cgimagetoraster) which can
print TIFF files and should do a better job of preserving colorspaces.
You can test your driver with this filter by printing from the
command-line using:

     lp -d printername filename.tiff

where "printername" is the queue name of the printer - run:

     lpstat -p

to see the queue names for your printers...

Finally, you can get help from the Apple engineers by posting to
the Apple printing list (lists.apple.com, then follow the links to
subscribe...)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list