Re: colormanagement with ghostscript ?



Nikolaus Breuer wrote:
do current ghostscript releases (8.57) allow for full true
colormanagement (CM),

If gostscript is used as a rip (i.e. to create raster images from
PostScript or PDF input) then it does indeed support PostScript level2/3
color management, as it is documented in the PLRM. Note that the
PostScript language describes device independent color spaces with Color
Space Arrays and Color Rendering Dictionaries, and not with ICC profiles
(but ICC-based color spaces described by ICC profiles embedded in PDF
documents are of course understood by gs too, when it prints PDF
documents). So IMO one has to feed gs with CRDs and CSAs instead of ICC
profiles. UseCIEColor and DefaultRGB/Gray/CMYK resources are of course
honored too, as specified in the PLRM. But when I investigated the color
transformations a little bit closer some time ago (maybe gs 8.15 ??? - I
don't rememer exactly), I was not fully satisfied with the accuracy of
the transformations. Basically it worked pretty well, but converting an
image with ICC profiles from RGB to CMYK and sending the CMYK image in a
PS file to gs still resulted in visibly better printed images, than
sending the RGB image directly in a PS file to gs and letting gs convert
to CMYK via PostScript color management. Possibly this has improved in
the meantime, but I don't know (IMO this was vastly caused by the way
how gs did cache the color transformations internally).

But below you're actually rather asking for distiller functionality and
distiller compatibility, than for support of PostScript color management
in general.

i.e. could they apply a standard input profile,
say AdobeRGB1998.icc to a .ps (produced, e.g. by Latex/dvips) and use an
appropriate standard output profile, say EuropeISOCoatedFOGRA27.icc, to
generate a corresponding prepress compliant .pdf?

Looking at http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm I'm not
sure I understand if or if not ghostscript can do full CM, and if yes,
what the appropriate gs cmdline options beyond
-dProcessColorModel=/DeviceCMYK -dPDFSETTINGS=/prepress ... ought to be
to specify profiles.

Hence, _IF_ gs can do the job I would clearly love to learn about a real
simple example, say how to generate a prepress ready .pdf with CMYK
values for FOGRA27 or whatever from a trivial .ps like

%!
0 0 1 setrgbcolor
0 0 72 72 rectfill
showpage

where RGB 'blue' e.g. is meant to refer to an AdobeRGB1998 color space
(in which case the final .pdf CMYK should read (0.3490 0.3098 0 0).

The pdfwrite device is indeed special, as it is a high-level device and
does not necessarily behave like other devices which produce raster
data. Nevertheless, have you already tried to use simply the usual
PostScript color management functionality in conjunction with the
pdfwrite device? Like for instance

%%%%%%%%%% prologue %%%%%%%%%%
currentglobal true setglobal
%%% Establish an Adobe RGB compatibe color space as Default RGB
/DefaultRGB
[ /CIEBasedABC <<
/DecodeLMN [
{ 2.2 exp } bind dup dup
]
/MatrixLMN [0.5766690429 0.2973449753 0.0270313614
0.1855582379 0.6273635663 0.0706888525
0.1882286462 0.0752914585 0.9913375368]
/WhitePoint [0.9504559271 1.0 1.0890577508]
>> ] /ColorSpace defineresource pop
%%% Don't remap CMYK
/DefaultCMYK [ /DeviceCMYK ] /ColorSpace defineresource pop
setglobal
%%% Set ProcessColorModel and turn on remapping of
%%% device color spaces to CIE-based ones
<<
/ProcessColorModel /DeviceCMYK
/UseCIEColor true
>>
setpagedevice
%%% set output color space
<<
...CRD contents for your desired printer
CMYK color space and rendering intent...
>>
setcolorrendering
<< /ColorConversionStrategy /CMYK >> setdistillerparams
%%%%%%%%%% end prologue %%%%%%%%%%

%%%%%%%%%% start of document %%%%%%%%%%
0 0 1 setrgbcolor
0 0 72 72 rectfill
showpage

I just tried this with ps2pdf of gs 8.54, using a CRD for ISOcoated and
relative colormetric intent and got a PDF file containing

[...]
0.855 1 0 0 k
0 0 720 720 re f
[...]

For comparison, "icctrans -t1 -i AdobeRGB1998.icc -o ISOcoated.icc" gives me

LittleCMS ColorSpace conversion calculator - v3.0
Enter values, 'q' to quit
R (0..255)? 0 0
G (0..255)? 0
B (0..255)? 255
C=85.97 M=100.00 Y=0.00 K=0.00

I'm not sure, whether this works for all object types, in particular for
images. I think there were some restrictions in the past. But possibly
they were lifted in the mean time. According to the current ps2pdf
manual (http://ghostscript.com/doc/current/Ps2pdf.htm), recent gs
versions can even create PDF X/3 (which would be hardly possible w/o
color management). I'm also not aware, whether gs possibly accepts an
ICC profile instead of a CRD in the mean time (as non-standard extension
to the PLRM).

Regards,
Gerhard

.



Relevant Pages

  • PDF print quality poor for graphs/figures (DVI>PS>PDF)
    ... to the prints from the postscript. ... The original images are all in. ... But the PDF images look pixelated. ... dots and text in the graph look broken and fuzzy. ...
    (comp.text.tex)
  • Re: multiple subpaths
    ... I know in PDF exists some operators that do this. ... The problem is that PostScript is an opaque imaging model, ... There are some nasty ways of getting some transparency, ... the transparent areas to images and render the images in PostScript. ...
    (comp.lang.postscript)
  • Re: Grinding a blank lathe tool for parting or cutoff
    ... Perhaps someone who can extract it all, including the images, ... can convert it to a postscript, and from there to pdf, so the rest of us ...
    (rec.crafts.metalworking)
  • Re: need help with distiller error
    ... I send PDF documents for plates all the time. ... I even save images in PDF files with JPEG compression turned ... To say you see artifacts in JPEG images is a half-truth. ... Use of RGB is now commonplace and in many cases a better color space. ...
    (comp.publish.prepress)
  • Re: difference in output between postscript and pdf terminal
    ... Included plots are in eps, ... I use pdfLaTeX to generate pdf. ... And sometimes I need postscript output, for whatever reason, so I too want my source to be compatible between latex and pdflatex. ... same output for all terminals. ...
    (comp.graphics.apps.gnuplot)