Use Case: I have an EPS graphic created from Photoshop. When I view this EPS in gsview32, the flower is brown. I convert it into a PDF using ghostscript: gswin32c -sDEVICE=pdfwrite -sOutputFile="my.pdf" -dBATCH -dNOPAUSE -dPDFSETTINGS=/prepress -dEncodeColorImages=false -dEncodeGrayImages=false -dEncodeMonoImages=false "my.eps" When I view the PDF in Acrobat Reader, the flower is still brown. When I view the PDF is gsview, the flower is almost black. If I convert either that PDF or the original EPS into a postscript document using the pswrite device, gsview shows the output with the flower almost black. My concern is with the color change of the flower and the inconsistency of the PDF view between Acrobat Reader and gsview. (I'm assuming Bugzilla will allow me to append my test files after adding the ticket.)
Created attachment 3959 [details] SourceEPS.eps Shrunk for testing purposes.
Created attachment 3960 [details] ConvertedPDF.pdf PDF was converted from source EPS. Has right color in Acrobat Reader, wrong color in gsview.
Created attachment 3961 [details] ConvertedPS.ps Converted from the Source EPS with the pswrite device.
The source EPS is CMYK. If I convert the source to RGB in photoshop before converting, the flower doesn't change color after conversion. (In a previous comment, I wrote that the source was from Illustrator -- I meant Photoshop.)
By default, Acrobat (and most other Adobe tools) write CMYK expecting a CMYK color space converted to RGB as if the CMYK were USCoatedSWOP. Also, by default, for performance, Ghostscript uses 'dumb' CMYK to RGB so that C+M+Y == Black (the same as K). If you specify -dUseCIEColor, then the flower is brown. gsview is probably setting this by default in order to emulate Acrobat more closely. The definition for the CMYK colorspace when -dUseCIEColor is used in the Resource/ColorSpace/DefaultCMYK file. If you want to use 'SWOP' instead of this version, replace the DefaultCMYK file with the attached USWebCoatedSWOP.csa.ps
Created attachment 3962 [details] USWebCoatedSWOP.zip
When converting input files to PS or PDF, Ghostscript maps colors to RGB. set -dProcessColorModel=/DeviceCMYK for the output file to use CMYK colors. Note that the pswrite device ignores ProcessColorModel and always generates RGB.
That's tremendously helpful. Thank you very much, Ray. My problem is resolved. I think you're in a better position to decide whether this is a case where the defaults should be changed or not, so I'll ask you decide whether or not to invalidate the ticket. Thanks again.
Ray, do you have a tool for creating color tables from ICC profiles? I'm just wondering how you got that SWOP file. I'm interested in a relative colorimetric rendering, but that file seems to be geared towards a perceptual rendering. (I'm assuming that changing the renderingIntent line at the bottom of the dictionary won't do the trick.)
The tool to convert an ICC profiles to a "CSA" colorspace array that I've used\with good results is 'icc2ps'. You invoke it with the '-i' option to have it emit an "input" profile as a CSA, which can then be used with Ghostscript (or any Level 2 compliant PS interpreter or printer). Note that the 'icc2ps' program with the '-o' option can convert an ICC "output" profile to a CRD (colorrendering dictionary) that also works with Ghostscript.