Summary: | Colors slightly off in PostScript file | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Jack Moffitt <jack> |
Component: | PS Interpreter | Assignee: | Ray Johnston <ray.johnston> |
Status: | NOTIFIED FIXED | ||
Severity: | enhancement | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | 651 | Word Size: | --- |
Description
Jack Moffitt
2003-04-01 08:57:35 UTC
Created attachment 53 [details]
MuchaLuchaFortuneDonut.jpg
Created attachment 54 [details]
eps.zip
The file has an ICC input profile present as comments. Some Adobe applications read this ICC profile (even though PostScript doesn't support ICC profiles as PDF does). If I manually convert the hex ICC profile data to binary and use the profile (along with disabling the /DeviceCMYK setcolorspace that the file performs) then I get the same colors. This is really a feature request for Artifex to implement recoginition and loading of an ICC profile that is tagged by a DSC comment header. When we implement the capability of extracting ICC input profiles from the DSC comment, we should also verify that these color spaces are correctly written by the pdfwrite driver. This code already has the capability of embedding ICC profiles to output PDF files. Created attachment 90 [details]
cheerios.eps
This file is from a different customer.
I've removed the 'bountiable' keyword since I got frustrated with other tasks and took a few hours and implemented this. It will be committed shortly. Besides code to detect and load ICC profiles embedded in PostScript, it may be that all that is needed is to do two things to get Ghostscript to convert CMYK colors to what you (probably) expect: 1) If you are running Ghostscript 8.00 or later check to make sure that the following patch to lib/gs_init.ps has been applied: diff -c -r1.87 gs_init.ps *** lib/gs_init.ps 12 Apr 2003 18:08:18 -0000 1.87 --- lib/gs_init.ps 23 Apr 2003 18:33:16 -0000 *************** *** 1749,1754 **** --- 1749,1763 ---- put % Policies in pagedevice .setpagedevice %END MEDIA + + % Set up the interpreter context version of -dUSeCIEColor option + % so that .getuseciecolor has the correct value (see gs_setpd.ps) + /setpagedevice where { + pop systemdict /UseCIEColor known { + mark /UseCIEColor UseCIEColor .dicttomark setpagedevice + } if + } if + %END DISPLAYING (END DEVICE) VMDEBUG 2) set the -dUseCIEColor command line option. This will cause CMYK colors to go through the /DefaultCMYK ColorSpace conversion (actually installs a CIEBasedDEFG colorspace). Note that if you don't want to apply the patch, you could also use the following slightly more verbose command line option: -c "<< /UseCIEColor true >> setpagedevice " -f just before the input file to be converted. If you want an even better (SWOP) based DefaultCMYK colorspace conversion, I can provide one. This would replace the one in gs_ll3.ps Patches to lib/gs_icc.ps and lib/gs_pdfwr.ps committed to allow processing of %%BeginICCProfile section. NOTE: Only tested for CMYK profiles (which are the case for both of these samples and one free user bug file). |