[gs-devel] Use of Color Rendering Dictionary
Dan Coby
dan.coby at artifex.com
Sun Apr 6 19:34:41 PDT 2003
Rick,
CRDs are only used with CIE color spaces. Ghostscript
will substitute CIE color spaces for the various other
color spaces (DeviceGray, DeviceRGB, DeviceCMYK) if the
UseCIEColor device parameter is enabled.
Try adding the following to your command line:
-dUseCIEColor
Dan
-----Original Message-----
From: gs-devel-admin at ghostscript.com
[mailto:gs-devel-admin at ghostscript.com]On Behalf Of Rick Richardson
Sent: Sunday, March 23, 2003 9:15 AM
To: gs-devel at ghostscript.com
Subject: [gs-devel] Use of Color Rendering Dictionary
I have written an open source printer driver, "foo2zjs", for the
Minolta-QMS 2300 DL network color laser printer.
The driver works this way, where the data format at each step is
listed in parenthesis:
(PS) -> ghostscript -> (BITCMYK) -> foo2zjs -> (ZjSTREAM) -> printer
I figured ghostscript would be just the tool to do the "heavy
lifting", and all my foo2zjs program does is convert the 1-bit per
pixel per CMYK plane output of ghostscript into ZjStream bitmap
format.
All this works, but the colors I get on the laser printer need to be
adjusted (when compared to the closed source Windows driver). For
example, blues are much too dark and purplish. I'm not overly
concerned with the colors being "perfect", just that they are close to
what the Windows driver can do.
I'm not a PostScript expert, nor a color expert. So don't laugh too
hard if I'm barking up the wrong tree. But feel free to laugh a
little bit :-). I would appreciate any guidance after the laughter is
over.
I found the "Little CMS" package and used its "icc2ps" utility to
convert the 1200x600 ICC profile (.ICM) that came with the Windows
driver into a Postscript CRD. N.B. I only know how to spell CRD. :-)
I actually made 4 CRD files, since the icc2ps utility lets you specify
"Intent" (0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute).
It didn't have any setting for "Intent: something that works" :-).
I figured I could pump one of those CRD files into the Postscript
stream before the users Postscript file, and voila' I'd have the
correct colors. These files look something like this:
%!PS-Adobe-3.0
%
% Color Rendering Dictionary (CRD)
% Source: DL2312.icc
% Description: DL2312.icc
% Created: Sun Mar 23 09:19:10 2003
%
%%BeginResource
<<
/ColorRenderingType 1
/BlackPoint [0.0 0.0 0.0]
/WhitePoint [0.964200 1.000000 0.824900]
/MatrixPQR [0.40024 -0.2263 0.0 0.7076 1.16532 0.0 -0.08081
0.0457 0.91822 ]
/RangePQR [-0.125 1.375 -0.125 1.375 -0.125 1.375 ]
/TransformPQR [
<...............snip...................>
/RenderTable [ 33 33 33 [
<00166C00156A00146800135B00114E00092700000000000000000000000000
<...............snip...................>
80FFFF7AFFFF75FFFF71FFFF6DFFFF6BFFFF69FFFF66FFFF63FFFF61F9FF5F
F3FF5CE6FF58D9FF57C6FF56B3FF59A6FF5B9AFF5E8FFF6184FF667CFF6A74
FF6F6EFF7468FF7964FF7D60>
] 3 {} bind dup dup ]
/RenderingIntent (Perceptual)
>>
/Current exch /ColorRendering defineresource pop
%%EndResource
% CRD End
So I tried this out, sending the above file (unsnipped, of course)
before the users Postscript file into Ghostscript.
Unfortunately, nothing happened. The colors were just the same
as before. Then I added "setcolorrendering" to the end of the
">>" line, and deleted the line that starts with /Current. Still
no change to the colors.
Any ideas, tips, flames?????? Is my approach doomed anyway?
-Rick
--
Rick Richardson rickr at mn.rr.com http://home.mn.rr.com/richardsons/
Stock information at your fingertips: http://linuxtrade.0catch.com/
Scientists will achieve human immortality by 2100. Do you want the
government (you) to pay for *me* to live forever? Think about *that* before
voting for government insurance programs. I could be around a long time.
_______________________________________________
gs-devel mailing list
gs-devel at ghostscript.com
http://www.ghostscript.com/mailman/listinfo/gs-devel
More information about the gs-devel
mailing list