Bug 689802 - EPS Darkening
Summary: EPS Darkening
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: 8.62
Hardware: PC Windows XP
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-23 09:57 UTC by Adam Augusta
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
SourceEPS.eps (2.97 MB, application/postscript)
2008-04-23 10:21 UTC, Adam Augusta
Details
ConvertedPDF.pdf (715.10 KB, application/postscript)
2008-04-23 10:29 UTC, Adam Augusta
Details
ConvertedPS.ps (346.06 KB, application/postscript)
2008-04-23 10:33 UTC, Adam Augusta
Details
USWebCoatedSWOP.zip (237.27 KB, application/octet-stream)
2008-04-23 12:22 UTC, Ray Johnston
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Augusta 2008-04-23 09:57:07 UTC
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.)
Comment 1 Adam Augusta 2008-04-23 10:21:21 UTC
Created attachment 3959 [details]
SourceEPS.eps

Shrunk for testing purposes.
Comment 2 Adam Augusta 2008-04-23 10:29:13 UTC
Created attachment 3960 [details]
ConvertedPDF.pdf

PDF was converted from source EPS.  Has right color in Acrobat Reader, wrong
color in gsview.
Comment 3 Adam Augusta 2008-04-23 10:33:56 UTC
Created attachment 3961 [details]
ConvertedPS.ps

Converted from the Source EPS with the pswrite device.
Comment 4 Adam Augusta 2008-04-23 10:53:00 UTC
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.)
Comment 5 Ray Johnston 2008-04-23 12:21:21 UTC
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
Comment 6 Ray Johnston 2008-04-23 12:22:17 UTC
Created attachment 3962 [details]
USWebCoatedSWOP.zip
Comment 7 Ray Johnston 2008-04-23 12:25:27 UTC
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.
Comment 8 Adam Augusta 2008-04-23 12:35:33 UTC
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.
Comment 9 Adam Augusta 2008-06-09 17:11:22 UTC
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.)
Comment 10 Ray Johnston 2008-06-09 23:44:33 UTC
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.